| ... | @@ -14866,7 +14866,11 @@ static IrInstruction *ir_resolve_result(IrAnalyze *ira, IrInstruction *suspend_s | ... | @@ -14866,7 +14866,11 @@ static IrInstruction *ir_resolve_result(IrAnalyze *ira, IrInstruction *suspend_s |
| 14866 | } | 14866 | } |
| 14867 | case ResultLocIdReturn: { | 14867 | case ResultLocIdReturn: { |
| 14868 | bool is_comptime = value != nullptr && value->value.special != ConstValSpecialRuntime; | 14868 | bool is_comptime = value != nullptr && value->value.special != ConstValSpecialRuntime; |
| 14869 | if (is_comptime) return nullptr; | 14869 | if (is_comptime) |
| | 14870 | return nullptr; |
| | 14871 | if (!type_has_bits(ira->explicit_return_type) || !handle_is_ptr(ira->explicit_return_type)) |
| | 14872 | return nullptr; |
| | 14873 | |
| 14870 | ZigType *ptr_return_type = get_pointer_to_type(ira->codegen, ira->explicit_return_type, false); | 14874 | ZigType *ptr_return_type = get_pointer_to_type(ira->codegen, ira->explicit_return_type, false); |
| 14871 | result_loc->written = true; | 14875 | result_loc->written = true; |
| 14872 | result_loc->resolved_loc = ir_build_return_ptr(ira, result_loc->source_instruction, ptr_return_type); | 14876 | result_loc->resolved_loc = ir_build_return_ptr(ira, result_loc->source_instruction, ptr_return_type); |