diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-11-10 21:46:33 -0500 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-11-10 22:35:35 -0500 |
| commit | b5f89d681f5c9160ad866bec6ce7b552722f40ef (patch) | |
| tree | b9bf2a8ccbd0bfda7ec40b2abccbd3f45fe3d91e /src/Module.zig | |
| parent | 97e23896a9168132b6d36ca22ae1af10dd53d80d (diff) | |
| download | zig-b5f89d681f5c9160ad866bec6ce7b552722f40ef.tar.gz zig-b5f89d681f5c9160ad866bec6ce7b552722f40ef.zip | |
Module: fix use of `undefined` during decl cleanup
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig index eda4624bd0..d475f85c14 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -3542,8 +3542,6 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void { new_decl.ty = Type.type; new_decl.alignment = .none; new_decl.@"linksection" = .none; - 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. new_decl.analysis = .in_progress; new_decl.generation = mod.generation; @@ -3593,6 +3591,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void { new_namespace.ty = struct_ty.toType(); new_decl.val = struct_ty.toValue(); + new_decl.has_tv = true; + new_decl.owns_tv = true; new_decl.analysis = .complete; if (mod.comp.whole_cache_manifest) |whole_cache_manifest| { |
