mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix duplicate enum generation
This commit is contained in:
parent
a43b831965
commit
cca85566d3
@ -686,7 +686,7 @@ fn (p mut Parser) enum_decl(_enum_name string) {
|
|||||||
enum_name = p.prepend_mod(enum_name)
|
enum_name = p.prepend_mod(enum_name)
|
||||||
}
|
}
|
||||||
// Skip empty enums
|
// Skip empty enums
|
||||||
if enum_name != 'int' {
|
if enum_name != 'int' && !p.first_pass() {
|
||||||
p.cgen.typedefs << 'typedef int $enum_name;'
|
p.cgen.typedefs << 'typedef int $enum_name;'
|
||||||
}
|
}
|
||||||
p.check(.lcbr)
|
p.check(.lcbr)
|
||||||
|
Loading…
Reference in New Issue
Block a user