mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
parser: fix duplicate enum generation
This commit is contained in:
parent
a43b831965
commit
cca85566d3
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue