aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorMitchell Hashimoto <mitchell.hashimoto@gmail.com>2022-03-03 11:08:14 -0800
committerMitchell Hashimoto <mitchell.hashimoto@gmail.com>2022-03-03 11:08:14 -0800
commitb96d5fd71f12a56ba97c6ca36e47a7cbceee9696 (patch)
tree1b067bed06d0a7abe46bc56a98d8b39bfb1b0cb2 /src/Sema.zig
parent0924f17a234c48c4a7a17e44a1ffac6a9026d5e5 (diff)
downloadzig-b96d5fd71f12a56ba97c6ca36e47a7cbceee9696.tar.gz
zig-b96d5fd71f12a56ba97c6ca36e47a7cbceee9696.zip
stage2: peer resolve const array pointer to unknown ptr
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index a0908cf985..a58b07e6c5 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -18197,7 +18197,7 @@ fn resolvePeerTypes(
convert_to_slice = false;
- if (chosen_ty.childType().isConstPtr() and !candidate_ty.childType().isConstPtr())
+ if (chosen_ty.isConstPtr() and !candidate_ty.isConstPtr())
seen_const = true;
continue;
@@ -18209,7 +18209,7 @@ fn resolvePeerTypes(
chosen_ty_tag == .Pointer and
chosen_ty.ptrSize() == .Many)
{
- if (candidate_ty.childType().isConstPtr() and !chosen_ty.childType().isConstPtr())
+ if (candidate_ty.isConstPtr() and !chosen_ty.isConstPtr())
seen_const = true;
continue;