Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.34k stars 396 forks source link

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

Open atyrin opened 3 days ago

atyrin commented 3 days ago
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

atyrin commented 3 days ago

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 https://github.com/Kotlin/dokka/issues/2723