| ... | @@ -17542,6 +17542,10 @@ static IrInstruction *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstructionPh | ... | @@ -17542,6 +17542,10 @@ static IrInstruction *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstructionPh |
| 17542 | if (peer_parent != nullptr && ir_result_has_type(peer_parent->parent)) { | 17542 | if (peer_parent != nullptr && ir_result_has_type(peer_parent->parent)) { |
| 17543 | if (peer_parent->parent->id == ResultLocIdReturn) { | 17543 | if (peer_parent->parent->id == ResultLocIdReturn) { |
| 17544 | resolved_type = ira->explicit_return_type; | 17544 | resolved_type = ira->explicit_return_type; |
| | 17545 | } else if (peer_parent->parent->id == ResultLocIdCast) { |
| | 17546 | resolved_type = ir_resolve_type(ira, peer_parent->parent->source_instruction->child); |
| | 17547 | if (type_is_invalid(resolved_type)) |
| | 17548 | return ira->codegen->invalid_instruction; |
| 17545 | } else { | 17549 | } else { |
| 17546 | ZigType *resolved_loc_ptr_type = peer_parent->parent->resolved_loc->value.type; | 17550 | ZigType *resolved_loc_ptr_type = peer_parent->parent->resolved_loc->value.type; |
| 17547 | ir_assert(resolved_loc_ptr_type->id == ZigTypeIdPointer, &phi_instruction->base); | 17551 | ir_assert(resolved_loc_ptr_type->id == ZigTypeIdPointer, &phi_instruction->base); |