mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
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.
17 lines
209 B
Kotlin
Vendored
17 lines
209 B
Kotlin
Vendored
const val N = 42
|
|
|
|
fun test(): Int {
|
|
var sum = 0
|
|
for (i in 1 .. N) {
|
|
sum += i
|
|
}
|
|
return sum
|
|
}
|
|
|
|
// 0 iterator
|
|
// 0 getStart
|
|
// 0 getEnd
|
|
// 0 getFirst
|
|
// 0 getLast
|
|
// 0 getStep
|
|
// 1 IF_ICMP |