aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-11-16 19:13:31 +0200
committerVeikka Tuominen <git@vexu.eu>2022-11-20 20:25:11 +0200
commit510b891d271bc69c64e4be8b3e008c8a51a235e7 (patch)
treeb26b14482f56bdb663f1dae2b31b70e18bc69b74 /src
parent0616d2966a623a005891a2037b49cc2b8ad5b9c4 (diff)
downloadzig-510b891d271bc69c64e4be8b3e008c8a51a235e7.tar.gz
zig-510b891d271bc69c64e4be8b3e008c8a51a235e7.zip
Sema: handle `opt_payload` in `beginComptimePtrLoad`
Diffstat (limited to 'src')
-rw-r--r--src/Sema.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 5151904f0b..90de77a57e 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -26555,6 +26555,10 @@ fn beginComptimePtrLoad(
.null_value => {
return sema.fail(block, src, "attempt to use null value", .{});
},
+ .opt_payload => blk: {
+ const opt_payload = ptr_val.castTag(.opt_payload).?.data;
+ break :blk try sema.beginComptimePtrLoad(block, src, opt_payload, null);
+ },
.zero,
.one,