diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-02-03 16:38:35 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 16:38:35 +0000 |
| commit | 317722b37b201e393aed60045f4bf9649103e63e (patch) | |
| tree | d0485fccbcfd0d2951ac373bbd5d483cc8539ca2 /src/Zcu/PerThread.zig | |
| parent | e61acd8eb563d3c233202ef3a1a63df384d09943 (diff) | |
| parent | dc5c8278474f998360bc48e3dd0fe9a2929b4374 (diff) | |
| download | zig-317722b37b201e393aed60045f4bf9649103e63e.tar.gz zig-317722b37b201e393aed60045f4bf9649103e63e.zip | |
Merge pull request #20271 from MasonRemaley/zon
ZON
Diffstat (limited to 'src/Zcu/PerThread.zig')
| -rw-r--r-- | src/Zcu/PerThread.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig index 2c8dc54809..d564ef8da5 100644 --- a/src/Zcu/PerThread.zig +++ b/src/Zcu/PerThread.zig @@ -1867,6 +1867,7 @@ fn semaFile(pt: Zcu.PerThread, file_index: Zcu.File.Index) Zcu.SemaError!void { const zcu = pt.zcu; const gpa = zcu.gpa; const file = zcu.fileByIndex(file_index); + assert(file.getMode() == .zig); assert(zcu.fileRootType(file_index) == .none); if (file.status != .success_zir) { @@ -2022,7 +2023,9 @@ pub fn importFile( if (mod.deps.get(import_string)) |pkg| { return pt.importPkg(pkg); } - if (!std.mem.endsWith(u8, import_string, ".zig")) { + if (!std.mem.endsWith(u8, import_string, ".zig") and + !std.mem.endsWith(u8, import_string, ".zon")) + { return error.ModuleNotFound; } const gpa = zcu.gpa; |
