aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-07-05 00:58:47 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-07-05 15:02:13 -0400
commit86570b3e2c58da76d7e94531c1aa8017012b0521 (patch)
treed99ede808fcb32307224875d9c642fe0c5d0989b /src/Sema.zig
parent6fc9f6c5f6a067475f97cd16cb265332c8b7c6f3 (diff)
downloadzig-86570b3e2c58da76d7e94531c1aa8017012b0521.tar.gz
zig-86570b3e2c58da76d7e94531c1aa8017012b0521.zip
stage2: Fix corrupted Type when de-referencing field pointer
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 e234255c6e..60d636b81e 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -21614,10 +21614,10 @@ fn beginComptimePtrLoad(
deref.ty_without_well_defined_layout = field_ptr.container_ty;
}
- const tv = &(deref.pointee orelse {
+ const tv = deref.pointee orelse {
deref.pointee = null;
break :blk deref;
- });
+ };
const coerce_in_mem_ok =
(try sema.coerceInMemoryAllowed(block, field_ptr.container_ty, tv.ty, false, target, src, src)) == .ok or
(try sema.coerceInMemoryAllowed(block, tv.ty, field_ptr.container_ty, false, target, src, src)) == .ok;