lang 2.4: parameterized-protocol method calls on pack elements
`xs[i].get()` on a parameterised `..xs: Box(T)` pack now resolves — the canonical `ValueListenable` shape. registerParamImpl, for a CONCRETE-struct source, now also registers the impl's methods as `<Source>.<method>` in fn_ast_map (like a non-parameterised impl), so UFCS finds them. Such methods are already fully concrete (`impl Box(s64) for IntCell` → `get(self: *IntCell) -> s64`), so there's nothing to monomorphize; generic/pack sources stay lazy in param_impl_map. First impl wins on a name collision. Heterogeneous parameterised packs work: each `xs[i]` binds a different T and dispatches to its own impl. Regression: examples/194-protocol-pack-parameterized.sx (Box(s64) IntCell + Box(string) StrCell, order-independent).
This commit is contained in:
1
tests/expected/194-protocol-pack-parameterized.exit
Normal file
1
tests/expected/194-protocol-pack-parameterized.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
2
tests/expected/194-protocol-pack-parameterized.txt
Normal file
2
tests/expected/194-protocol-pack-parameterized.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
first=11 second=hi
|
||||
first=x second=99
|
||||
Reference in New Issue
Block a user