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

disable the snake_case const warning for now

This commit is contained in:
Alexander Medvednikov 2019-10-12 22:38:06 +03:00
parent a76165828b
commit 208f17a73a
2 changed files with 5 additions and 5 deletions

View File

@ -518,9 +518,9 @@ fn (p mut Parser) const_decl() {
continue continue
} }
mut name := p.check_name() // `Age = 20` mut name := p.check_name() // `Age = 20`
if !p.pref.building_v && p.mod != 'os' && contains_capital(name) { //if !p.pref.building_v && p.mod != 'os' && contains_capital(name) {
p.warn('const names cannot contain uppercase letters, use snake_case instead') //p.warn('const names cannot contain uppercase letters, use snake_case instead')
} //}
name = p.prepend_mod(name) name = p.prepend_mod(name)
mut typ := '' mut typ := ''
if p.is_vh { if p.is_vh {

View File

@ -10,9 +10,9 @@ import (
fn test_import() { fn test_import() {
assert os.SUCCESS == os.SUCCESS && assert os.SUCCESS == os.SUCCESS &&
t.MonthDays[0] == t.MonthDays[0] && t.month_days[0] == t.month_days[0] &&
s2.Size == s2.Size && s2.Size == s2.Size &&
math.Pi == math.Pi && math.pi == math.pi &&
l.INFO == l.INFO && l.INFO == l.INFO &&
s5.Size == s5.Size s5.Size == s5.Size
} }