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

14 lines
282 B
Kotlin
Vendored

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