aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-12-03 17:07:13 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-12-03 17:07:13 -0700
commitafaef3619458e6e8c79c15944fa871ca6cc5a58a (patch)
tree0266ab1af76bdb24a2821fffedb03476e0652ab1 /src
parentfd18252a7165f04c07289c422eb0b808cc245b05 (diff)
downloadzig-afaef3619458e6e8c79c15944fa871ca6cc5a58a.tar.gz
zig-afaef3619458e6e8c79c15944fa871ca6cc5a58a.zip
stage1: compile error for pointer arithmetic on ptr-to-array
See #2018
Diffstat (limited to 'src')
-rw-r--r--src/stage1/ir.cpp2
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;