mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
18 lines
423 B
Kotlin
Vendored
18 lines
423 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 (4..11 step 2).withIndex()) {
|
|
indexList += i
|
|
valueList += v
|
|
}
|
|
assertEquals(listOf(0, 1, 2, 3), indexList)
|
|
assertEquals(listOf(4, 6, 8, 10), valueList)
|
|
|
|
return "OK"
|
|
} |