Skip to content

Commit

Permalink
Update src/aro/Parser.zig
Browse files Browse the repository at this point in the history
Co-authored-by: Veikka Tuominen <[email protected]>
  • Loading branch information
ehaas and Vexu authored Apr 17, 2024
1 parent c36fecb commit 46b692f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/aro/Parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2489,12 +2489,13 @@ fn enumSpec(p: *Parser) Error!Type {
try p.errTok(.enum_fixed, colon);
break :fixed null;
};
if (fixed.isInt() and !fixed.is(.@"enum")) {
try p.errTok(.enum_fixed, colon);
} else {

if (!fixed.isInt() or fixed.is(.@"enum")) {
try p.errStr(.invalid_type_underlying_enum, ty_start, try p.typeStr(fixed));
break :fixed Type.int;
}

try p.errTok(.enum_fixed, colon);
break :fixed fixed;
} else null;

Expand Down

0 comments on commit 46b692f

Please sign in to comment.