What is happening? What should have happened instead?
Relates to #4513
Without the experimental java symbol analysis flag enabled, the DProperty synthesized from a Java private field with public accessor methods has annotations from the Java field. With the symbol analysis enabled, the annotation on the field no longer appears on the DProperty.
This scenario seems like it should be equivalent to a regular Kotlin property with a @field annotation, which does have the annotation appear on the DProperty.
If the Java field is public, then the field annotation appears on the DProperty when the symbol analysis is enabled.
Reproducer
package test.pkg
annotation class Anno
package test.pkg;
public class JavaClass {
@Anno
private int foo = 0;
public int getFoo() { return foo; }
public void setFoo(int foo) { this.foo = foo; }
}
package test.pkg
class KotlinClass {
@field:Anno
var foo: Int = 0
}
Dokka version
2.3.0-dev-434
Kotlin Gradle Plugin (KGP) version
No response
Android Gradle Plugin (AGP) version (if applicable)
No response
Build tool
Gradle
Project type
Anything else? (optional)
No response
What is happening? What should have happened instead?
Relates to #4513
Without the experimental java symbol analysis flag enabled, the
DPropertysynthesized from a Java private field with public accessor methods has annotations from the Java field. With the symbol analysis enabled, the annotation on the field no longer appears on theDProperty.This scenario seems like it should be equivalent to a regular Kotlin property with a
@fieldannotation, which does have the annotation appear on theDProperty.If the Java field is public, then the field annotation appears on the
DPropertywhen the symbol analysis is enabled.Reproducer
Dokka version
2.3.0-dev-434
Kotlin Gradle Plugin (KGP) version
No response
Android Gradle Plugin (AGP) version (if applicable)
No response
Build tool
Gradle
Project type
Anything else? (optional)
No response