diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-06-21 16:54:46 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-06-21 16:54:46 -0400 |
| commit | 5441f7767237709e8f3c05c2dc75070e835b4024 (patch) | |
| tree | 2143e4fd903bdb6e2f86af6aa93ea6bb5d7a04b0 /src/ir.cpp | |
| parent | 142e77abbb8a88c2c6473921d0c600faf3d34a62 (diff) | |
| download | zig-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.cpp | 3 |
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); |
