stage2: fix unwrap function call with optional pointer return value

This commit is contained in:
Andrew Kelley
2021-11-24 22:27:40 -07:00
parent a130eac785
commit b560f46c87
7 changed files with 91 additions and 26 deletions

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);