mirror of
https://github.com/vlang/v.git
synced 2025-08-04 02:07:28 -04:00
parser: fix const error
This commit is contained in:
parent
9ef51ee714
commit
4dc9167b60
@ -2381,7 +2381,7 @@ fn (mut p Parser) const_decl() ast.ConstDecl {
|
|||||||
}
|
}
|
||||||
if !p.pref.translated && !p.is_translated && util.contains_capital(name)
|
if !p.pref.translated && !p.is_translated && util.contains_capital(name)
|
||||||
&& !is_virtual_c_const {
|
&& !is_virtual_c_const {
|
||||||
p.error_with_pos('${name} const names cannot contain uppercase letters, use snake_case instead',
|
p.error_with_pos('const names cannot contain uppercase letters, use snake_case instead',
|
||||||
pos)
|
pos)
|
||||||
}
|
}
|
||||||
full_name := p.prepend_mod(name)
|
full_name := p.prepend_mod(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user