build: close package variant identity gaps

This commit is contained in:
2026-08-12 22:09:55 +09:00
parent 1724ea086f
commit 2dd6b8a250
5 changed files with 57 additions and 7 deletions

View File

@@ -312,7 +312,9 @@ fn lookupvisibletype(c: *checker, name: str) *syntax.sym = {
for (b != nil) {
if (b.skind == syntax.skind.SK_TYPE
&& syntax.streq(b.name, name)
&& directmodvisible(c, b.mod)) { return b; };
&& directmodvisible(c, b.mod)
&& (b.decl == nil || b.decl.imported == 0
|| b.decl.exported != 0)) { return b; };
b = b.snext;
};
p = p.parent;