Files
kotlin/compiler/testData/codegen/bytecodeText/forLoop/forIntInDownTo.kt
Mark Punzalan 7680e7fd56 Use while loop for progressions that cannot overflow (instead of
do-while with enclosing "not empty" check).

Also do not add additional "not empty" condition for `until` loops when
the given bound is a constant != MIN_VALUE.
2019-04-04 09:07:19 +02:00

14 lines
192 B
Kotlin
Vendored

fun test(): Int {
var sum = 0
for (i in 4 downTo 1) {
sum = sum * 10 + i
}
return sum
}
// 0 iterator
// 0 getStart
// 0 getEnd
// 0 getFirst
// 0 getLast
// 1 IF_ICMP