Files
kotlin/compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt
2019-11-19 11:00:09 +03:00

12 lines
226 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
val a = BooleanArray(5)
val x = a.iterator()
var i = 0
while (x.hasNext()) {
if (a[i] != x.next()) return "Fail $i"
i++
}
return "OK"
}