Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[K2] Incorrect signature in synthetic property for Java field with a private setter #3672

Open
atyrin opened this issue Jul 5, 2024 · 2 comments
Labels
bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888

Comments

@atyrin
Copy link
Contributor

atyrin commented Jul 5, 2024

public class Parent {
    private int value;

    public int getValue() {
        return value;
    }

    private void setValue(int value) {
        this.value = value;
    }
}
class Child: Parent()

In K2 the property on Child page generated as var

image

And it doesn't change with hiding/showing private declarations.


K1 had a val property (and private setter if private declarations are shown)

Installation

  • Dokka version: 2.0.0
@atyrin atyrin added the bug label Jul 5, 2024
@atyrin
Copy link
Contributor Author

atyrin commented Jul 5, 2024

As I see in the K2 IDE, it shown as
image
in K1 it was a VAL_REASSIGNMENT. So the problem in the Analysis API.

So now it is a var with private setter. And it looks like the duplicate of #2723

@atyrin atyrin added the topic: K2 Issues / PRs that are related to the K2 migration. See #2888 label Jul 5, 2024
@vmishenev
Copy link
Member

Related: #3339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Projects
None yet
Development

No branches or pull requests

2 participants