mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 00:21:35 +00:00
18 lines
420 B
Kotlin
Vendored
18 lines
420 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
fun box(): String {
|
|
val indexList = mutableListOf<Int>()
|
|
val valueList = mutableListOf<Int>()
|
|
for ((i, v) in (7 downTo 4).withIndex()) {
|
|
indexList += i
|
|
valueList += v
|
|
}
|
|
assertEquals(listOf(0, 1, 2, 3), indexList)
|
|
assertEquals(listOf(7, 6, 5, 4), valueList)
|
|
|
|
return "OK"
|
|
} |