aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-21 16:54:46 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-21 16:54:46 -0400
commit5441f7767237709e8f3c05c2dc75070e835b4024 (patch)
tree2143e4fd903bdb6e2f86af6aa93ea6bb5d7a04b0 /src/ir.cpp
parent142e77abbb8a88c2c6473921d0c600faf3d34a62 (diff)
downloadzig-5441f7767237709e8f3c05c2dc75070e835b4024.tar.gz
zig-5441f7767237709e8f3c05c2dc75070e835b4024.zip
fix implicit cast bitcast result to error union by returning
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 7b6f2dffe6..425c225308 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -15207,6 +15207,9 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe
parent_ptr_type->data.pointer.is_const, parent_ptr_type->data.pointer.is_volatile, PtrLenSingle,
parent_ptr_align, 0, 0, parent_ptr_type->data.pointer.allow_zero);
+ if (value->value.special == ConstValSpecialRuntime) {
+ parent_result_loc->value.special = ConstValSpecialRuntime;
+ }
result_loc->written = true;
result_loc->resolved_loc = ir_analyze_ptr_cast(ira, suspend_source_instr, parent_result_loc,
ptr_type, result_bit_cast->base.source_instruction, false);