-
Notifications
You must be signed in to change notification settings - Fork 454
Open
Labels
buglanguage: JavaIssue/PR related to the Java language feature/analysis/docsIssue/PR related to the Java language feature/analysis/docslanguage: KotlinIssue/PR related to the Kotlin language feature/analysis/docsIssue/PR related to the Kotlin language feature/analysis/docstopic: K2Issues / PRs that are related to the K2 migration. See #2888Issues / PRs that are related to the K2 migration. See #2888
Description
In K2 interoperability with Java seems to be fixed since we get synthetic properties from Analysis API directly.
In K1 Dokka has plenty of uncovered corner cases, since Dokka handles such properties by itself.
Besides, even Dokka's unit tests are incorrect.
Discovered cases
- Dokka K1 removes the prefix
is
in the name of synthetic property.
Example:
The case is from our unit test. The name of this property should beisBool
rather thanbool
.
The proof from IDE:
// FILE: A.java:
public class A {
private boolean bool = true;
public boolean isBool() { return bool; }
public void setBool(boolean bool) { this.bool = bool; }
}
// FILE: foo.kt
fun foo(a: A) {
a.isBool // property name is `isBool`, in Dokka K1 `bool`
}
class B : A // B should have `bool` property
- Dokka K1 should display a synthetic property with a public backing field. Currently, it displays a field and accesors instead of a single property.
Example: this test.
The proof from IDE:
// FILE: A.java:
public class A {
protected int a = 1; // or public
public int getA() { return a; }
public void setA(int a) { this.a = a; }
}
// FILE: foo.kt
fun foo(a: A) {
a.a // property is available
}
class B : A // B should just have `a` property, but in Dokka K1 `a` field and `getA` and `setA`
Metadata
Metadata
Assignees
Labels
buglanguage: JavaIssue/PR related to the Java language feature/analysis/docsIssue/PR related to the Java language feature/analysis/docslanguage: KotlinIssue/PR related to the Kotlin language feature/analysis/docsIssue/PR related to the Kotlin language feature/analysis/docstopic: K2Issues / PRs that are related to the K2 migration. See #2888Issues / PRs that are related to the K2 migration. See #2888