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:
agra
2026-05-30 03:25:04 +03:00
parent e96e76f6b0
commit 1f6e27d8f2
4 changed files with 55 additions and 2 deletions

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@
99