google / google/ksp

KSFunctionDeclaration.findOverridee() returns null for equals/hashCode/toString on interfaces in KSP2 with Kotlin 2.3.x

Open
#2,897 2 comments 0 reactions 0 assignees View on GitHub
P3
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

In KSP1 these returned `kotlin.Any`, which is what I would expect.
I'm using Kotlin 2.3.20, KSP 2.3.6, JVM target.

```
interface Foo {
val bar: Int
}
```

```
class MyFooProcessor(private val env: SymbolProcessorEnvironment) : SymbolProcessor {
override fun process(resolver: Resolver): List {
val foo = resolver.getClassDeclarationByName("Foo")!!
for (function in foo.getAllFunctions()) {
checkNotNull(function.findOverridee())
}
return emptyList()
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.