aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-03 17:56:37 -0500
committerGitHub <noreply@github.com>2022-03-03 17:56:37 -0500
commit0ea51f7f494cd84a48fd997b60196d6c4254ccac (patch)
tree16e37b2d217f7ea6418b04d37542b5f937351e34 /src/Sema.zig
parent6c045f9e83434e98fbfbd7c511e673274cb22afc (diff)
parentb96d5fd71f12a56ba97c6ca36e47a7cbceee9696 (diff)
downloadzig-0ea51f7f494cd84a48fd997b60196d6c4254ccac.tar.gz
zig-0ea51f7f494cd84a48fd997b60196d6c4254ccac.zip
Merge pull request #11049 from mitchellh/peer-arrays
stage2: fix a couple issues with peer resolution and const casting arrays
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 90de95b5d6..fa25e1e403 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -18270,7 +18270,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;
@@ -18282,7 +18282,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;
@@ -18303,7 +18303,7 @@ fn resolvePeerTypes(
convert_to_slice = false; // it already is a slice
// If the pointer is const then we need to const
- if (candidate_ty.childType().isConstPtr())
+ if (candidate_ty.isConstPtr())
seen_const = true;
continue;
@@ -18326,7 +18326,7 @@ fn resolvePeerTypes(
convert_to_slice = false; // it already is a slice
// If the prev pointer is const then we need to const
- if (chosen_child_ty.isConstPtr())
+ if (chosen_ty.isConstPtr())
seen_const = true;
continue;