Do you know if this bug is already known? ``` fun ...
# javascript
g
Do you know if this bug is already known?
Copy code
fun main(args: Array<String>) {
    println(val1) //<- prints undefined in Js, "i am not null" inside JVM
}
val val1 = fun1()
fun fun1()= fun2()
val val2 = "i am not null"
fun fun2(): String  = val2
https://try.kotlinlang.org/#/UserProjects/boih6su9togjanq26leoqbdm6r/k5vdcs8ss8l19pruqhvcbv7akj
👍 1
l
It seems to reveal an inconsistent initialization order where constants are initilized first on JVM, but strict order is used in JS. I'd report it on YouTrack. Nice puzzler BTW!
g