``` abstract class A { init { println(...
# javascript
k
Copy code
abstract class A {
    init {
        println("A.init: " + bar())
    }
    
    abstract fun foo(): String
    
    fun bar() = foo()
}

class C : A() {
    private val result = "OK"
    
    override fun foo() = result
}

fun main(args: Array<String>) {
    println("main: " + C().bar())
}
This code reproduces the problem. Its output is
Copy code
A.init: undefined
main: OK
The same behaviour in JVM, except for uninitialized value for
result
property is
null
instead of
undefined