The const-decl alias-registration path treated a qualified generic head (`ABox :: a.Box(s64)`) only as a gate exemption, then read the bare last-wins `struct_template_map` — so `ABox` and `BBox` both instantiated whichever same-name template won globally (both size 16). attempt-9 routed the annotation head sites through `qualifiedStructTemplate`; this applies the same selection to the two alias-registration branches (.call and .parameterized_type_expr) before the bare fallback, and extracts the shared instantiate-and-register logic into `registerGenericStructAlias`. ABox :: a.Box(s64) now resolves to a's template (size 8); BBox :: b.Box(s64) to b's (size 16). Regression 0773 pins it (fail-before alias a=16 b=16, after a=8 b=16).
4 lines
204 B
Plaintext
4 lines
204 B
Plaintext
// Author B's generic `Box` — two s64 fields (size 16). Same template NAME as
|
|
// A's, different layout: the qualified alias head must select by namespace author.
|
|
Box :: struct($T: Type) { x: T; y: T; }
|