Skip to content

[KSP2] Incorrect parentDeclaration for Java method inheriting a Kotlin property #2498

@bacecek

Description

@bacecek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions