fix(kotlin): emit implements edge for interface delegation (by)#1644
Closed
Synvoya wants to merge 1 commit into
Closed
fix(kotlin): emit implements edge for interface delegation (by)#1644Synvoya wants to merge 1 commit into
implements edge for interface delegation (by)#1644Synvoya wants to merge 1 commit into
Conversation
class Foo : Bar by baz produced no edge because the delegation_specifier loop only handled constructor_invocation and bare user_type children; the by form wraps user_type in an explicit_delegation node. Add that branch so the implements edge (and generic-arg recovery) fires.
safishamsi
added a commit
that referenced
this pull request
Jul 4, 2026
…delegation) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
Merged into v8 as Nice catch on the |
safishamsi
added a commit
that referenced
this pull request
Jul 4, 2026
19 fixes/features since 0.9.5. Highlights: - Ruby: module/Struct.new/Class.new/Data.define container nodes (#1640) and constant-receiver singleton-call resolution (#1634) — Rails/Zeitwerk graphs now get real cross-file edges. - Kill cross-language phantom imports_from edges from unresolved bare npm imports (#1638); harden semantic extraction against malformed LLM chunks (#1631); deterministic graph.json node/edge ordering for parallel semantic backends (#1632). - Contributor extractor fixes: Apex interface multiple inheritance (#1645), Kotlin `by` delegation (#1644). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it fixes
Kotlin interface delegation —
class Foo : Bar by baz— emitted no edge, so the delegated interfaceBarwas silently dropped from the graph.The
delegation_specifierloop only handledconstructor_invocation(→inherits) and a bareuser_type(→implements) child. Thebyform produces anexplicit_delegationnode that wraps theuser_type, so neither branch fired and no edge was emitted. Delegation is idiomatic Kotlin (the whole point ofby).Fix
Add an
explicit_delegationbranch in that loop: take its wrappeduser_typechild and emit theimplementsedge, leaving the existing generic type-argument recovery intact.now emits
implements: LoggingList -> MutableList(andreferences: LoggingList -> Tfor the generic arg).Test
tests/fixtures/sample.kt: added the delegation example above.tests/test_languages.py:test_kotlin_interface_delegation_emits_implementsasserts theimplementsedge.pytest tests/test_languages.py -k kotlin→ 9 passed (negative control without the fix fails on the missing edge).