Files
kotlin-fork/compiler/testData/codegen/box/ranges/forInProgressionWithIndex/kt42909.kt
T
2020-11-23 13:56:17 +03:00

16 lines
293 B
Kotlin
Vendored

// WITH_RUNTIME
// KJS_WITH_FULL_RUNTIME
fun box(): String {
var r = test()
if (r != "01") throw AssertionError(r.toString())
return "OK"
}
private fun test(): String {
var r = ""
for ((i, _) in (1..'c' - 'a').withIndex()) {
r += i.toString()
}
return r
}