Is there any know issue related to evaluation orde...
# stdlib
t
Is there any know issue related to evaluation order of delegated properties and other object's fields initialization expressions? I get "undefined" related errors when using properties that are delegated inside other field initialization expressions. Edit: Turned the issue was caused by completely different bug. Compare the result of:
Copy code
fun main() {
    println(arrayOf("x")[1])
}
on JVM and JS - https://pl.kotl.in/OQW7p5XAL I guess that's stdlib bug. Slack Conversation
h
It's not a bug, it's documented: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/get.html says:
If the index is out of bounds of this array, throws an IndexOutOfBoundsException except in Kotlin/JS where the behavior is unspecified.