The following code now gives the warning “Property must be initialized, be final, or be abstract. This warning will become an error in future releases”.
I really don’t think the proposed solutions give better code. How does the Kotlin developers envision this ideally should be done when I need to run initialize() before I can set id and textEntry?
class FooBar(
idElements: List<Int>,
defaultTextEntry: String? = null
) : IFooBar {
override val id: DotIntID
override val textEntry: DpTextEntry?
init {
val (id, textEntry) = initialize(idElements, defaultTextEntry)
this.id = id
this.textEntry = textEntry
}