authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-29 20:49:31-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-29 20:49:31-07:00
log5d696b0706de2ac267cb774ef39e0d81131d5c38
tree0e7a903e54510035ba0a437a0343bc0f1330cbc2
parent8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f

stage2: fix File incorrectly freeing its Namespace


1 files changed, 1 insertions(+), 1 deletions(-)

src/Module.zig+1-1
......@@ -776,6 +776,7 @@ pub const Scope = struct {
776776 pkg: *Package,
777777 /// The namespace of the struct that represents this file.
778778 /// Populated only when status is success.
779 /// Owned by its owner Decl Value.
779780 namespace: *Namespace,
780781 /// All namespaces that this file contains. This is here so that
781782 /// when a file is updated, and new ZIR code is generated, the
......@@ -812,7 +813,6 @@ pub const Scope = struct {
812813
813814 pub fn deinit(file: *File, mod: *Module) void {
814815 const gpa = mod.gpa;
815 file.namespace.deinit(mod);
816816 gpa.free(file.sub_file_path);
817817 file.unload(gpa);
818818 file.* = undefined;