Sema: make check for namespace lookup of private declarations more strict

Previously sema only checked that the private declaration was in the same
file as the lookup but now it also checks that the namespace where
the decl was included from was also in the same file.

Closes #13077
This commit is contained in:
Veikka Tuominen
2022-11-09 18:01:34 +02:00
parent 25c8506421
commit 9b832e7f53
5 changed files with 23 additions and 4 deletions

View File

@@ -75,3 +75,7 @@ test {
const a = AA.b(42);
try expect(a.x == AA.c().expected);
}
comptime {
_ = @import("usingnamespace/file_1.zig");
}