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.
This commit is contained in:
Andrew Kelley
2022-05-23 18:48:10 -07:00
parent c97c7f9e3b
commit 02e9d9b43b
6 changed files with 98 additions and 35 deletions

View File

@@ -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,