Files
kotlin/compiler/testData/codegen/bytecodeText/forLoop/primitiveProgression.kt
Mark Punzalan ea9572ad28 Add DefaultProgressionHandler that handles for-loops over
non-specialized progressions, including "step" progressions.

DefaultProgressionHandler uses the "first/last/step" properties of
the progression when building the loop header.
2019-04-04 09:07:19 +02:00

12 lines
201 B
Kotlin
Vendored

fun f() {
for (i in 0..5 step 2) {
}
for (i in 5 downTo 1 step 1) { // suppress optimized code generation for 'for-in-downTo'
}
}
// 0 iterator
// 2 getFirst
// 2 getLast
// 2 getStep