1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: _ warning => error

This commit is contained in:
Swastik Baranwal 2019-10-12 16:51:06 +05:30 committed by Alexander Medvednikov
parent a06e2298f0
commit 336e82d162

View File

@ -242,8 +242,7 @@ fn (p mut Parser) fn_decl() {
p.error('function names cannot contain uppercase letters, use snake_case instead')
}
if f.name[0] == `_` {
// TODO error
p.warn('function names cannot start with `_`')
p.error('function names cannot start with `_`, use snake_case instead')
}
if f.name.contains('__') {
p.error('function names cannot contain double underscores, use single underscores instead')