dokka icon indicating copy to clipboard operation
dokka copied to clipboard

`kotlin-as-java-plugin` not rendering extension properties correctly

Open Seggan opened this issue 5 months ago • 3 comments

Given the code

val String.test: String
    get() = this + " test"

the kotlin-as-java-plugin produces

Image

A spurious, nonexistent field is created, as well as messing up the signature for the function: it's supposed to be getTest(String $self), not String getTest()

Seggan avatar Jul 14 '25 17:07 Seggan

Hey! The kotlin-as-java plugin is currently not a priority. Could you explain why you need to use it?

whyoleg avatar Aug 27 '25 14:08 whyoleg

I have a library written in Kotlin but expect many Java users to use it. So I need the Java-facing documentation for the Java users.

Seggan avatar Aug 27 '25 15:08 Seggan

This is actually a more specific case of non-@JvmField non-const properties generating spurious private fields (that still render despite documented visibilities being public actually)

Seggan avatar Sep 24 '25 20:09 Seggan