Repository navigation
Conversation
|
I ran this against Edge diff. 9 edges were removed and 2 added, and all 11 changes are correct:
The three Kotlin-only apps are unchanged. The build and full suite pass. On Regressions: four edges that
Suggested fix. When the imported type is in the index, fall through to the existing logic instead of returning null. Return null only when the type is external and no project extension is declared on that receiver name. Minor points:
It merges cleanly with #1933, and the two are complementary. #1933 types receivers from property and local declarations; it doesn't cover |
|
Addressed the four reported regressions in d30590c. Imported project types can continue through inherited-member resolution; visible project extensions remain eligible, including companion, object, cross-file, and external-type extensions. An extension not imported into the caller stays unresolved. The import check now accepts a trailing line comment, and The test fixture imports cross-package extensions explicitly because Kotlin's package/import rules make imports file-local; overload resolution considers accessible members and extensions in scope, with members taking priority. This is also consistent with the reference-target and scope model exposed by Kotlin's Analysis API. That is a design comparison, not a claim about Kotlin LSP's closed implementation. I kept the local import scan for now: |
|
Fork follow-up: mixxer/codegraph-aosp#8 carries the reviewer regression fixes on top of the fork's merged Kotlin PR. Its Node 22/24, native kernel/AOSP, and final CI checks all passed. |
|
Re-checked All four reported regressions are fixed:
Corpora: three Kotlin-only Android apps are unchanged. A Kotlin/Java/C app has 9 lost and 2 gained, all 11 correct, the same as the previous head. Tests: the Kotlin-related suites plus It also merges cleanly with #1933 and the rest of our open resolver work, with no behavioural conflicts. LGTM. The only conflict is textual, with #1949, in |
…by qualified name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for rechecking the native-kernel cases and the corpus diff. I agree with the result; I don't see another code change needed from this review. I'll resolve the textual conflict with #1949 on whichever PR lands second. |
|
Fork integration status: mixxer/codegraph-aosp#8 is merged at |
|
Re-checked against main (34ede4d). It still merges cleanly, and main now covers 9 of the 12 assertions in 🤖 Generated with Claude Code |
…n on it colbymchenry#2196 made a Kotlin import from outside the project own its name, so `Modifier.fillMaxSize()` after `import androidx.compose.ui.Modifier` no longer lands on a same-named project method. The rule returns before any other strategy, so a project extension on that type - Compose's `fun Modifier.pad()`, indexed as `Modifier::pad` - could not be reached by `Modifier.pad()` either (nor `Color.fromHex()` on a `fun Color.Companion.fromHex()`). Inside the rule, a Kotlin `Type.member` call now resolves to a project extension `Type::member` that the call site can see (same file or package, or imported by name or `.*`, as for other top-level Kotlin declarations) and whose own file imports the same type. Anything else stays unlinked, as before. The visibility check follows the idea of `kotlinExtensionInScope` from the discussion in colbymchenry#1948. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d30590c to
a842527
Compare
…n on it colbymchenry#2196 made a Kotlin import from outside the project own its name, so `Modifier.fillMaxSize()` after `import androidx.compose.ui.Modifier` no longer lands on a same-named project method. The rule returns before any other strategy, so a project extension on that type - Compose's `fun Modifier.pad()`, indexed as `Modifier::pad` - could not be reached by `Modifier.pad()` either (nor `Color.fromHex()` on a `fun Color.Companion.fromHex()`). Inside the rule, a Kotlin `Type.member` call now resolves to a project extension `Type::member` that the call site can see (same file or package, or imported by name or `.*`, as for other top-level Kotlin declarations) and whose own file imports the same type. Anything else stays unlinked, as before. The visibility check follows the idea of `kotlinExtensionInScope` from the discussion in colbymchenry#1948. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n on it colbymchenry#2196 made a Kotlin import from outside the project own its name, so `Modifier.fillMaxSize()` after `import androidx.compose.ui.Modifier` no longer lands on a same-named project method. The rule returns before any other strategy, so a project extension on that type - Compose's `fun Modifier.pad()`, indexed as `Modifier::pad` - could not be reached by `Modifier.pad()` either (nor `Color.fromHex()` on a `fun Color.Companion.fromHex()`). Inside the rule, a Kotlin `Type.member` call now resolves to a project extension `Type::member` that the call site can see (same file or package, or imported by name or `.*`, as for other top-level Kotlin declarations) and whose own file imports the same type. Anything else stays unlinked, as before. The visibility check follows the idea of `kotlinExtensionInScope` from the discussion in colbymchenry#1948. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n on it colbymchenry#2196 made a Kotlin import from outside the project own its name, so `Modifier.fillMaxSize()` after `import androidx.compose.ui.Modifier` no longer lands on a same-named project method. The rule returns before any other strategy, so a project extension on that type - Compose's `fun Modifier.pad()`, indexed as `Modifier::pad` - could not be reached by `Modifier.pad()` either (nor `Color.fromHex()` on a `fun Color.Companion.fromHex()`). Inside the rule, a Kotlin `Type.member` call now resolves to a project extension `Type::member` that the call site can see (same file or package, or imported by name or `.*`, as for other top-level Kotlin declarations) and whose own file imports the same type. Anything else stays unlinked, as before. The visibility check follows the idea of `kotlinExtensionInScope` from the discussion in colbymchenry#1948. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Resolve Kotlin calls through imported types and their nested classes, including imported outer types, while rejecting unimported receiver types. Preserve receiver-scoped extension lookup for external imported types such as Modifier.pad instead of exiting before extension matching.
Validation
6560052a6f856855d3f71eee838fd66ccfa4285d; tested heada8425277350d91ee8fcc594cdd677724046ae74f.