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:
parent
a06e2298f0
commit
336e82d162
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user