mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
parser: fix const error
This commit is contained in:
parent
9ef51ee714
commit
4dc9167b60
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue