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

@@ -3060,7 +3060,9 @@ lookup_visible_type(Checker *c, const char *name)
for (Scope *p = c->cur; p; p = p->parent) {
for (Sym *b = p->first; b; b = b->next)
if (b->kind == SK_TYPE && strcmp(b->name, name) == 0
&& direct_module_visible(c, b->mod))
&& direct_module_visible(c, b->mod)
&& (b->decl == NULL || !b->decl->imported
|| b->decl->export))
return b;
}
return NULL;