| ... | ... | @@ -9698,10 +9698,12 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError |
| 9698 | 9698 | }; |
| 9699 | 9699 | |
| 9700 | 9700 | const maybe_union_ty = blk: { |
| 9701 | const zir_tags = sema.code.instructions.items(.tag); |
| 9701 | 9702 | const zir_data = sema.code.instructions.items(.data); |
| 9702 | 9703 | const cond_index = Zir.refToIndex(extra.data.operand).?; |
| 9703 | 9704 | const raw_operand = sema.resolveInst(zir_data[cond_index].un_node.operand) catch unreachable; |
| 9704 | | break :blk sema.typeOf(raw_operand); |
| 9705 | const target_ty = sema.typeOf(raw_operand); |
| 9706 | break :blk if (zir_tags[cond_index] == .switch_cond_ref) target_ty.elemType() else target_ty; |
| 9705 | 9707 | }; |
| 9706 | 9708 | const union_originally = maybe_union_ty.zigTypeTag() == .Union; |
| 9707 | 9709 | |