mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 12:33:19 +00:00
Sema: skip analysis of empty enum blocks
For these, the ZIR code has an empty block rather than a block with a single `break_inline` instruction.
This commit is contained in:
parent
9e49a65e1b
commit
478dac5346
@ -900,7 +900,9 @@ fn zirEnumDecl(
|
||||
};
|
||||
defer assert(enum_block.instructions.items.len == 0); // should all be comptime instructions
|
||||
|
||||
_ = try enum_sema.analyzeBody(&enum_block, body);
|
||||
if (body.len != 0) {
|
||||
_ = try enum_sema.analyzeBody(&enum_block, body);
|
||||
}
|
||||
|
||||
sema.branch_count = enum_sema.branch_count;
|
||||
sema.branch_quota = enum_sema.branch_quota;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user