| ... | @@ -14951,7 +14951,14 @@ static IrInstruction *ir_analyze_instruction_resolve_result(IrAnalyze *ira, IrIn | ... | @@ -14951,7 +14951,14 @@ static IrInstruction *ir_analyze_instruction_resolve_result(IrAnalyze *ira, IrIn |
| 14951 | if (actual_elem_type->id == ZigTypeIdOptional && implicit_elem_type->id != ZigTypeIdOptional) { | 14951 | if (actual_elem_type->id == ZigTypeIdOptional && implicit_elem_type->id != ZigTypeIdOptional) { |
| 14952 | return ir_analyze_unwrap_optional_payload(ira, &instruction->base, result_loc, false, true); | 14952 | return ir_analyze_unwrap_optional_payload(ira, &instruction->base, result_loc, false, true); |
| 14953 | } else if (actual_elem_type->id == ZigTypeIdErrorUnion && implicit_elem_type->id != ZigTypeIdErrorUnion) { | 14953 | } else if (actual_elem_type->id == ZigTypeIdErrorUnion && implicit_elem_type->id != ZigTypeIdErrorUnion) { |
| 14954 | return ir_analyze_unwrap_error_payload(ira, &instruction->base, result_loc, false, true); | 14954 | IrInstruction *unwrapped_err_ptr = ir_analyze_unwrap_error_payload(ira, &instruction->base, |
| | 14955 | result_loc, false, true); |
| | 14956 | ZigType *actual_payload_type = actual_elem_type->data.error_union.payload_type; |
| | 14957 | if (actual_payload_type->id == ZigTypeIdOptional && implicit_elem_type->id != ZigTypeIdOptional) { |
| | 14958 | return ir_analyze_unwrap_optional_payload(ira, &instruction->base, unwrapped_err_ptr, false, true); |
| | 14959 | } else { |
| | 14960 | return unwrapped_err_ptr; |
| | 14961 | } |
| 14955 | } | 14962 | } |
| 14956 | return result_loc; | 14963 | return result_loc; |
| 14957 | } | 14964 | } |