| ... | ... | @@ -10624,19 +10624,7 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst |
| 10624 | 10624 | if (actual_type->id == ZigTypeIdComptimeFloat || |
| 10625 | 10625 | actual_type->id == ZigTypeIdComptimeInt) |
| 10626 | 10626 | { |
| 10627 | | if ((err = ensure_complete_type(ira->codegen, wanted_type))) |
| 10628 | | return ira->codegen->invalid_instruction; |
| 10629 | | if (wanted_type->id == ZigTypeIdEnum) { |
| 10630 | | IrInstruction *cast1 = ir_analyze_cast(ira, source_instr, wanted_type->data.enumeration.tag_int_type, value); |
| 10631 | | if (type_is_invalid(cast1->value.type)) |
| 10632 | | return ira->codegen->invalid_instruction; |
| 10633 | | |
| 10634 | | IrInstruction *cast2 = ir_analyze_cast(ira, source_instr, wanted_type, cast1); |
| 10635 | | if (type_is_invalid(cast2->value.type)) |
| 10636 | | return ira->codegen->invalid_instruction; |
| 10637 | | |
| 10638 | | return cast2; |
| 10639 | | } else if (ir_num_lit_fits_in_other_type(ira, value, wanted_type, true)) { |
| 10627 | if (ir_num_lit_fits_in_other_type(ira, value, wanted_type, true)) { |
| 10640 | 10628 | CastOp op; |
| 10641 | 10629 | if ((actual_type->id == ZigTypeIdComptimeFloat && |
| 10642 | 10630 | wanted_type->id == ZigTypeIdFloat) || |