What I wanted was to get the backing field created...
# getting-started
d
What I wanted was to get the backing field created and initial value passed to the constructor all at once, one of the Kotlin conveniences that we got too used to, I guess...
t
Switching to replies instead of using main channel, dunno which is preferred here.
Copy code
class KotlinChild(x: String) : JavaAbstractParent() {
    private val xProp = x
    override fun getX(): String = xProp
}
That's how I'd handle it if there was no field in
JavaAbstractParent
already, or something along those lines.
d
That's what I did, I was just surprised that the other way didn't work... thanks!
t
Sorry I couldn't provide more help, then! Might be my age showing, but I actually am glad that implicit setters/getters aren't capable of implementing things like that, I like to be explicit. Either way, glad you've got something working at least. o7