dokka
dokka copied to clipboard
[K2] Properties inherited from Java fields/synthetic properties with types that can be nullable shown as nullable
// Java:
public class Parent {
public String parentField;
}
// Kotlin:
class Child: Parent()
In K1 the parentField on Child page shown as a String
In K2 in it String?
Probably it is a good practice to consider Java code as nullable, but formally it is not a correct type.
NB: on Parent page Dokka shows a non-nullable type String
- Dokka version: 2.0.0
Although types from Java are flexible-nullable in Kotlin, Dokka does not support such types—String! (at least for Documentable).
Currently, the nullable String? seems to be a more accurate way to present these types than just String in K1.