Files
kotlin/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt
2018-06-09 19:15:38 +03:00

12 lines
241 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
val arr = intArrayOf()
fun box(): String {
val s = StringBuilder()
for ((index, x) in arr.withIndex()) {
return "Loop over empty array should not be executed"
}
return "OK"
}