Files
codegraph/__tests__
Aaron QueenandClaude Opus 5.5 3750921486 test(resolution): calls on nested receivers keep their evidence and guess no target
A member call on a nested receiver, like holder?.values.get(readKey()),
has failed both ways. Before PR #1790, each such call was linked by its
bare method name, to any project method called get. PR #1790 stopped
that by dropping every call on a chain rooted at a name, which also
dropped the call sites effects are drawn from (issue #1794). PR #1862
brought the dotted chains back as unresolved references; shapes its
chain pattern rejects, like holder[0].get(), are still dropped.

The test indexes eight receiver shapes in .ts, .tsx, .js and .jsx:
optional access, computed and numeric keys, a quoted key, a comment
inside the receiver, a non-ASCII name, an imported root and a namespace
import. It checks that the readKey() argument call survives, that
nothing links to Collision.get or to the imported object, and that the
three dotted chains (holder.values.get, imported.values.get and
data.holder.values.get) are still in the index, unresolved.

That last check is ours. As first written, the test passed on PR
1790's commit de5adba7, so it could not see the drop issue 1794 is
about. With it, the test fails 4 of 4 on de5adba7 (the chains are
gone) and 4 of 4 on its parent 72c1ff13 (every shape linked
Collision::get), with the kernel and with CODEGRAPH_KERNEL=0, and
passes 4 of 4 on main d02a88d0 with both. On main's code, putting the
drop back fails it, as it fails release-main-regressions' retention
test; letting the shapes the chain pattern rejects fall back to the
bare method name fails only this test. The non-ASCII name is written
with U+00F6 and U+00E9, Latin-1 letters, not homoglyphs. Test-only, so
no CHANGELOG entry.

Original PR #1844 by @bompus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:06:53 +00:00
..