aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-05-23 18:48:10 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-05-24 15:34:52 -0700
commit02e9d9b43b3b1cd9a4858a1f2bff302057dc2ee2 (patch)
tree211ff30043bc817e462a6845e2bf0437a7a179af /src/codegen.zig
parentc97c7f9e3bade44136f2bdf8ec4015f1b1b8303f (diff)
downloadzig-02e9d9b43b3b1cd9a4858a1f2bff302057dc2ee2.tar.gz
zig-02e9d9b43b3b1cd9a4858a1f2bff302057dc2ee2.zip
stage2: make `?anyerror` represented the same as `anyerror`
I was able to get the backend implementation working on LLVM and the C backend, but I'm going to ask for some help on the other backends.
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index 0f411dc481..eea8095a62 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -654,7 +654,7 @@ pub fn generateSymbol(
return Result{ .appended = {} };
}
- if (typed_value.ty.isPtrLikeOptional()) {
+ if (typed_value.ty.optionalReprIsPayload()) {
if (typed_value.val.castTag(.opt_payload)) |payload| {
switch (try generateSymbol(bin_file, src_loc, .{
.ty = payload_type,