aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig
index eda4624bd0..8ba856cf68 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -1250,6 +1250,7 @@ pub const ErrorMsg = struct {
comptime format: []const u8,
args: anytype,
) !*ErrorMsg {
+ assert(src_loc.lazy != .unneeded);
const err_msg = try gpa.create(ErrorMsg);
errdefer gpa.destroy(err_msg);
err_msg.* = try ErrorMsg.init(gpa, src_loc, format, args);
@@ -3542,8 +3543,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 +3592,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| {