Sema: avoid undefined fields in file struct decls

Fixes original comment of #12399
This commit is contained in:
Jacob Young 2022-10-01 03:51:36 -04:00
parent 34835bbbcf
commit d9490a4340

View File

@ -4430,6 +4430,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void {
new_decl.has_linksection_or_addrspace = false;
new_decl.ty = ty_ty;
new_decl.val = struct_val;
new_decl.@"align" = 0;
new_decl.@"linksection" = null;
new_decl.has_tv = true;
new_decl.owns_tv = true;
new_decl.alive = true; // This Decl corresponds to a File and is therefore always alive.