From b96d5fd71f12a56ba97c6ca36e47a7cbceee9696 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 3 Mar 2022 11:08:14 -0800 Subject: stage2: peer resolve const array pointer to unknown ptr --- src/Sema.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3