Skip to content

fix(resolution): resolve this.<field>.<method>() on the field's declared type (#1496) - #1792

Merged
colbymchenry merged 1 commit into
mainfrom
forge/fix-1496-ts-this-field-call
Sep 8, 2026
Merged

fix(resolution): resolve this.<field>.<method>() on the field's declared type (#1496)#1792
colbymchenry merged 1 commit into
mainfrom
forge/fix-1496-ts-this-field-call

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

Fixes #1496.

Summary

Linux verify (fail → pass)

Issue fixtures /tmp/cg-1496-repro (mailer / outbox / relay):

Backend Before After
wasm (CODEGRAPH_KERNEL=0) Outbox::send → Outbox::send Outbox::send → Mailer::send
native kernel Outbox::send → Outbox::send Outbox::send → Mailer::send

Both keep Relay::forward → Mailer::send; zero self-edges after the fix. Resolved by instance-method with refName this.mailer.send.

#1566 coexistence

All 10 #1566 resolution cases pass on wasm and kernel; nested-receiver parity cases for holder.values.get remain green. Both Unreleased changelog bullets retained.

Tests

Re-index after upgrading.

Agency: prefer land #1691 over reinventing; this PR supersedes #1691 when merged.

…ed type (#1496)

Land the six-file fix from upstream PR #1691 by danusha2345
(pr-1691 at 6d0e80d), preserving
wasm/native extraction parity and exclusive field-type resolution.

Preserve coexistence with the #1566 Map/collection fix merged in #1790,
including nested holder.values.get coverage and the unchanged #1566
Unreleased changelog bullet. EXTRACTION_VERSION remains unchanged.

Align the existing chained-receiver regression with the fix: a declared
service field calls its method, while an anonymous field type does not
bind to unrelated same-named project functions.

Verified on Linux with Node 22.19.0:
- Rebuilt the native kernel and TypeScript/browser distribution.
- Both backends change Outbox::send -> Outbox::send into
  Outbox::send -> Mailer::send, keep Relay::forward -> Mailer::send,
  and store no self-edges in the issue repro.
- Wasm: 224 tests passed; native kernel: 255 tests passed, no skips.
- All 10 #1566 resolution cases pass on each backend, plus all four
  nested-receiver extraction parity cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript: a call through this.<field> resolves to the ENCLOSING method when the two share a name — silent self-edge, 0% recall on that shape

1 participant