From 5d696b0706de2ac267cb774ef39e0d81131d5c38 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 29 Apr 2021 20:49:31 -0700 Subject: stage2: fix File incorrectly freeing its Namespace --- src/Module.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index 76a740bdc0..5ef0448849 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -776,6 +776,7 @@ pub const Scope = struct { pkg: *Package, /// The namespace of the struct that represents this file. /// Populated only when status is success. + /// Owned by its owner Decl Value. namespace: *Namespace, /// All namespaces that this file contains. This is here so that /// when a file is updated, and new ZIR code is generated, the @@ -812,7 +813,6 @@ pub const Scope = struct { pub fn deinit(file: *File, mod: *Module) void { const gpa = mod.gpa; - file.namespace.deinit(mod); gpa.free(file.sub_file_path); file.unload(gpa); file.* = undefined; -- cgit v1.2.3