diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-06-21 00:58:18 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-06-21 00:58:18 -0400 |
| commit | 4f21dc8a80d7b190d1812a668eaf570d377d95bf (patch) | |
| tree | b92d76a63f2cd7edbb4cd8e3eedf19b9475c283c /src | |
| parent | 708f153288ffa1aabb03c30b6a3a7898e27e92a0 (diff) | |
| download | zig-4f21dc8a80d7b190d1812a668eaf570d377d95bf.tar.gz zig-4f21dc8a80d7b190d1812a668eaf570d377d95bf.zip | |
fix regression with zero sized array
thanks mikdusan!
Diffstat (limited to 'src')
| -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 0645193454..828940a8ee 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -15200,6 +15200,9 @@ static IrInstruction *ir_resolve_result(IrAnalyze *ira, IrInstruction *suspend_s return unwrapped_err_ptr; } } + } else if (is_slice(actual_elem_type) && value_type->id == ZigTypeIdArray) { + // need to allow EndExpr to do the implicit cast from array to slice + result_loc_pass1->written = false; } return result_loc; } |
