ww: add file-scoped import aliases

This commit is contained in:
2026-08-14 10:56:34 +09:00
parent 351f4a25bc
commit 792b6ecbe5
14 changed files with 587 additions and 430 deletions

View File

@@ -586,8 +586,15 @@ fn pushargsrev(c: *cgen, arg: *syntax.node, param: *syntax.node, memphase: bool,
};
if (!aistagged) {
widensz = slotsize(c, ptype);
let tagged: *syntax.node = resolvetagged(c, ptype);
let t: i32 = taggedvariantindex(c, tagged, arg);
// The parameter may come from an imported signature whose
// qualifier is owned by that interface source, not by the
// caller currently being emitted. The checker has already
// resolved and stamped its canonical type; use that identity
// directly instead of re-resolving source-local alias text in
// the caller's scope. Mirrors cstage's Type-keyed
// cg_tag_for_variant path.
let t: i32 = taggedvariantindext(c,
ptype.type_: *syntax.tinfo, arg);
// tagged→tagged subset sources synthesize
// no scalar tag here (the widen store
// remaps); only a CONCRETE source with no