diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-28 17:42:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 19:49:08 -0700 |
| commit | 196ddf010c97f2faf69513e61099a233d4270795 (patch) | |
| tree | 14a3e4630e0cba5cab0434b7717bea092b5123c4 /src/Module.zig | |
| parent | 8fa44969095caa293cb76b9a0b5fc0c0c270dc3b (diff) | |
| download | zig-196ddf010c97f2faf69513e61099a233d4270795.tar.gz zig-196ddf010c97f2faf69513e61099a233d4270795.zip | |
frontend: fix populateTestFunctions accessing the wrong module
The test runner reads the list of test function pointers from its own
builtin module, which is the root_mod, not main_mod.
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig index 558c03d685..9d3810f671 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -5307,7 +5307,7 @@ pub fn populateTestFunctions( ) !void { const gpa = mod.gpa; const ip = &mod.intern_pool; - const builtin_mod = mod.main_mod.getBuiltinDependency(); + const builtin_mod = mod.root_mod.getBuiltinDependency(); const builtin_file = (mod.importPkg(builtin_mod) catch unreachable).file; const root_decl = mod.declPtr(builtin_file.root_decl.unwrap().?); const builtin_namespace = mod.namespacePtr(root_decl.src_namespace); |
