fix(extraction): qualified Type::member refs skip the name gate — no-import references resolve (#812)
`KtHandlers::handle` registered from another file produced no edge: the
extraction gate required the scope to be a same-file type or an IMPORTED
name, but Java/Kotlin same-package references and Kotlin companion members
need no import at all, so the gate could never see them. (The "companion
members extract unqualified" limit recorded during Arc A was a probe
artifact: a SINGLE-LINE `class X { companion object { … } }` is an
upstream tree-sitter-kotlin misparse (ERROR node); real multi-line
companions extract transparently as qualified methods of the class.)
Qualified `Type::member` candidates now skip the name gate the same way
`this.<member>` ones do: the explicit-ref syntax is self-selecting, and
resolution stays scope-suffix-anchored + unique-or-drop, so a
`Decoy::handle` can never match a `KtHandlers::handle` ref (tested).
A/B vs main: rxjava +4 (same-package `Maybe::just` / `Single::just`
method refs), fmt +3 (gtest `&Test::DeleteSelf_` /
`&TestSuite::RunSetUpTestSuite` cross-file member pointers), okio 0-delta,
redis byte-identical — every new edge verified genuine, zero calls edges
touched, node counts identical.
Full suite 1392 passed. EXTRACTION_VERSION 22 → 23 (re-index to benefit).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1f15f93feb
commit
dce61a5f4a
@@ -192,10 +192,16 @@ Index cost on redis: +6% time, +5% db size.
|
||||
cross-file (scope gated on same-file types ∪ imported names, incl. the last
|
||||
segment of dotted JVM imports); `this::m` / `super::m` ride the
|
||||
class-scoped + supertype path.
|
||||
- **Kotlin companion-object members** extract UNQUALIFIED (node `handle`, not
|
||||
`KtHandlers::Companion::handle` — pre-existing extraction shape), so
|
||||
`KtHandlers::handle` refs to companion members stay silent rather than
|
||||
guess. Fix belongs in kotlin companion extraction.
|
||||
- **Qualified `Type::member` candidates skip the name gate** (like `this.X`):
|
||||
Java/Kotlin same-package references and Kotlin companions need NO import,
|
||||
so the gate could never see their scope — and the explicit-ref syntax is
|
||||
self-selecting while resolution stays scope-suffix-anchored +
|
||||
unique-or-drop (a `Decoy::handle` can't match a `KtHandlers::handle` ref).
|
||||
This is also what resolves companion-member refs: companions extract
|
||||
TRANSPARENTLY (`KtHandlers::handle`, method of the class) in real
|
||||
multi-line code. (A single-line `class X { companion object { … } }` is an
|
||||
upstream tree-sitter-kotlin misparse — ERROR node — and only ever appeared
|
||||
in our own probe fixture; don't chase it.)
|
||||
- **Swift cross-file bare references**: Swift sees module-wide symbols without
|
||||
imports, so cross-file bare callbacks only resolve when repo-unique
|
||||
(functions; methods are enclosing-type-only). Cross-TYPE `#selector`
|
||||
|
||||
Reference in New Issue
Block a user