[KSP2] Incorrect parentDeclaration for Java method inheriting a Kotlin property
Open
P3
- Dominant language
- Kotlin
- Stars
- 3.5k
- Forks
- 415
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 53
Description
Reproducer:
```
// FILE: K.kt
interface MyInterface {
val property: Int
}
// FILE: MyInterfaceImplJava.java
class MyInterfaceImplJava implements MyInterface {
@Override
public int getProperty() { return 0; }
}
```
`KSDeclaration.parent` and `KSDeclaration.parentDeclaration` returns `property` instead of `MyInterfaceImplJava`. KSP1 works correctly.
I've got it in #2497.
Contributor guide
Assessment
This issue has not been assessed yet.