motiejus/zig

fork of https://codeberg.org/ziglang/zig
git clone https://git.jakstys.lt/motiejus/zig.git
Log | Tree | Refs | README | LICENSE

commit 5d696b0706de2ac267cb774ef39e0d81131d5c38 (tree)
parent 8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 29 Apr 2021 20:49:31 -0700

stage2: fix File incorrectly freeing its Namespace

Diffstat:
Msrc/Module.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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;