Skip to content

experimentalPsiResolution missing synthetic function when overriding getter of capitalized property. #2925

@bcorso

Description

@bcorso

Consider the following case of a Kotlin interface with a capitalzed property and a Java implementation that overrides the property getter:

interface MyInterface {
    val Foo: String
}

public class MyClass implements MyInterface {
    @Override
    public String getFoo() {
        return "";
    }
}

When enabling PSI mode we get the following diff in member declarations compared to AA mode

+ // PSI mode
- // AA mode
FUNCTION: MyInterface.getFoo (JAVA_LIB)
- FUNCTION: MyInterface.getFoo (SYNTHETIC)

In particular, PSI mode is missing a synthetic version of the function that exists in AA mode.

It's not clear whether PSI mode should try to match AA mode in this case or if AA mode should try to match PSI mode (by removing the extra synthetic getter). In either case, this is likely a pretty rare edge case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2affects usability but not blocks usersbugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions