Files
kotlin/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt
2019-11-19 11:00:09 +03:00

13 lines
282 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
val xs = listOf<Any>().asSequence()
fun box(): String {
val s = StringBuilder()
for ((index, x) in xs.withIndex()) {
return "Loop over empty list should not be executed"
}
return "OK"
}