mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: allow C values in enum
This commit is contained in:
parent
6c59b306c7
commit
b62bb22fa6
@ -767,6 +767,12 @@ pub fn (c mut Checker) enum_decl(decl ast.EnumDecl) {
|
||||
ast.IntegerLiteral {}
|
||||
ast.PrefixExpr {}
|
||||
else {
|
||||
if field.expr is ast.Ident {
|
||||
expr := field.expr as ast.Ident
|
||||
if expr.is_c {
|
||||
continue
|
||||
}
|
||||
}
|
||||
mut pos := field.expr.position()
|
||||
if pos.pos == 0 {
|
||||
pos = field.pos
|
||||
|
Loading…
Reference in New Issue
Block a user