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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user