parser: _ warning => error

pull/2312/head
Swastik Baranwal 2019-10-12 16:51:06 +05:30 committed by Alexander Medvednikov
parent a06e2298f0
commit 336e82d162
1 changed files with 1 additions and 2 deletions

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')