diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-06-19 23:52:51 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-06-19 23:52:51 -0400 |
| commit | 3c541d7be38d625645276f8a0dee57774fe94134 (patch) | |
| tree | dddb742c68b4a1f1b59fad0629d2322b0edade3c /src/ir.cpp | |
| parent | 6217b401f94380a0a82aa979bc4ac90e7431267d (diff) | |
| download | zig-3c541d7be38d625645276f8a0dee57774fe94134.tar.gz zig-3c541d7be38d625645276f8a0dee57774fe94134.zip | |
fix peer result loc fn call with comptime condition
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 32a614ad0e..f3fa2215a2 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -16004,7 +16004,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c IrInstruction *result_loc; if (handle_is_ptr(impl_fn_type_id->return_type)) { result_loc = ir_resolve_result(ira, &call_instruction->base, call_instruction->result_loc, - impl_fn_type_id->return_type, nullptr, true, false); + impl_fn_type_id->return_type, nullptr, true, true); if (type_is_invalid(result_loc->value.type) || instr_is_unreachable(result_loc)) { return result_loc; } @@ -16124,7 +16124,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c IrInstruction *result_loc; if (handle_is_ptr(return_type)) { result_loc = ir_resolve_result(ira, &call_instruction->base, call_instruction->result_loc, - return_type, nullptr, true, false); + return_type, nullptr, true, true); if (type_is_invalid(result_loc->value.type) || instr_is_unreachable(result_loc)) { return result_loc; } |
