lang F1 6: generic-struct -> parameterized-protocol erasure (issue 0054 FIXED)
Two fixes, root-caused from xx Combined -> VL(s64) trapping: - instantiateGenericStruct binds the template name to the concrete instance (tb.put(tmpl.name, id)), so an impl method self: *Combined resolves self.field to the instance (Combined__s64_s64), not the 0-field generic stub. This was a general pre-existing bug: self.x on ANY generic-struct impl method failed. - createProtocolThunk monomorphizes the template method for a generic-struct instance (Combined.get -> Combined__s64_s64.get with the instance bindings), so the erasure vtable dispatches instead of hitting an unreachable thunk. xx c on a generic Combined now dispatches correctly (examples/212 -> 99). 247 examples + unit green.
This commit is contained in:
1
tests/expected/212-generic-struct-protocol-erase.exit
Normal file
1
tests/expected/212-generic-struct-protocol-erase.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
tests/expected/212-generic-struct-protocol-erase.txt
Normal file
1
tests/expected/212-generic-struct-protocol-erase.txt
Normal file
@@ -0,0 +1 @@
|
||||
99
|
||||
Reference in New Issue
Block a user