mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
fix assertion failure for some switch errors
This commit is contained in:
parent
9eb29e81f9
commit
03b6d9f547
@ -10233,6 +10233,8 @@ static TypeTableEntry *ir_analyze_instruction_switch_br(IrAnalyze *ira,
|
||||
|
||||
for (size_t i = 0; i < case_count; i += 1) {
|
||||
IrInstructionSwitchBrCase *new_case = &cases[i];
|
||||
if (new_case->value == ira->codegen->invalid_instruction)
|
||||
return ir_unreach_error(ira);
|
||||
new_case->block->ref_instruction = &switch_br_instruction->base;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user