parser: fix const error

This commit is contained in:
Alexander Medvednikov 2025-07-19 18:51:06 +03:00
parent 9ef51ee714
commit 4dc9167b60

View File

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