aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid <87927264+Rexicon226@users.noreply.github.com>2023-11-16 08:08:30 -0800
committerGitHub <noreply@github.com>2023-11-16 16:08:30 +0000
commit673a1efa228f1e28317c202b8ab9135afb9ed2a2 (patch)
tree1cc2c251fb44892ddeb3fa2d4bb606f7de3b692d /src
parentb1730880894493d7cd9b1b7bc06e49c9120ca7b6 (diff)
downloadzig-673a1efa228f1e28317c202b8ab9135afb9ed2a2.tar.gz
zig-673a1efa228f1e28317c202b8ab9135afb9ed2a2.zip
Sema: include sentinel in type of pointer-to-array `ptr` field
Resolves: #18007
Diffstat (limited to 'src')
-rw-r--r--src/Sema.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 39fd818d97..aa6dab0b2b 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -26089,7 +26089,7 @@ fn fieldVal(
const ptr_info = object_ty.ptrInfo(mod);
const result_ty = try sema.ptrType(.{
.child = ptr_info.child.toType().childType(mod).toIntern(),
- .sentinel = ptr_info.sentinel,
+ .sentinel = if (inner_ty.sentinel(mod)) |s| s.toIntern() else .none,
.flags = .{
.size = .Many,
.alignment = ptr_info.flags.alignment,