| ... | @@ -22768,7 +22768,9 @@ static IrInstGen *ir_analyze_instruction_switch_else_var(IrAnalyze *ira, | ... | @@ -22768,7 +22768,9 @@ static IrInstGen *ir_analyze_instruction_switch_else_var(IrAnalyze *ira, |
| 22768 | } | 22768 | } |
| 22769 | // Make note of the errors handled by other cases | 22769 | // Make note of the errors handled by other cases |
| 22770 | ErrorTableEntry **errors = allocate<ErrorTableEntry *>(ira->codegen->errors_by_index.length); | 22770 | ErrorTableEntry **errors = allocate<ErrorTableEntry *>(ira->codegen->errors_by_index.length); |
| 22771 | for (size_t case_i = 0; case_i < instruction->switch_br->case_count; case_i += 1) { | 22771 | // We may not have any case in the switch if this is a lone else |
| | 22772 | const size_t switch_cases = instruction->switch_br ? instruction->switch_br->case_count : 0; |
| | 22773 | for (size_t case_i = 0; case_i < switch_cases; case_i += 1) { |
| 22772 | IrInstSrcSwitchBrCase *br_case = &instruction->switch_br->cases[case_i]; | 22774 | IrInstSrcSwitchBrCase *br_case = &instruction->switch_br->cases[case_i]; |
| 22773 | IrInstGen *case_expr = br_case->value->child; | 22775 | IrInstGen *case_expr = br_case->value->child; |
| 22774 | if (case_expr->value->type->id == ZigTypeIdErrorSet) { | 22776 | if (case_expr->value->type->id == ZigTypeIdErrorSet) { |