diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-12-03 17:07:13 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-12-03 17:07:13 -0700 |
| commit | afaef3619458e6e8c79c15944fa871ca6cc5a58a (patch) | |
| tree | 0266ab1af76bdb24a2821fffedb03476e0652ab1 /src/stage1 | |
| parent | fd18252a7165f04c07289c422eb0b808cc245b05 (diff) | |
| download | zig-afaef3619458e6e8c79c15944fa871ca6cc5a58a.tar.gz zig-afaef3619458e6e8c79c15944fa871ca6cc5a58a.zip | |
stage1: compile error for pointer arithmetic on ptr-to-array
See #2018
Diffstat (limited to 'src/stage1')
| -rw-r--r-- | src/stage1/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 347014f257..f4cb8a9aed 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -17841,7 +17841,7 @@ static bool is_pointer_arithmetic_allowed(ZigType *lhs_type, IrBinOp op) { return false; switch (lhs_type->data.pointer.ptr_len) { case PtrLenSingle: - return lhs_type->data.pointer.child_type->id == ZigTypeIdArray; + return false; case PtrLenUnknown: case PtrLenC: return true; |
