stage2: fix unwrap function call with optional pointer return value

This commit is contained in:
Andrew Kelley committed 2021-11-24 22:44:33 -07:00
1 parent a130eac785
commit b560f46c87
7 files changed
+91 -26

No files matched your search

+7 -2
View File
@@ -3464,11 +3464,16 @@ fn semaDecl(mod: *Module, decl: *Decl) !bool {
queue_linker_work = true;
}
},
.array, .@"struct", .@"union" => {
.generic_poison => unreachable,
.unreachable_value => unreachable,
.function => {},
else => {
log.debug("send global const to linker: {*} ({s})", .{ decl, decl.name });
queue_linker_work = true;
},
else => {},
}
decl.ty = try decl_tv.ty.copy(&decl_arena.allocator);