mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 08:31:29 +00:00
HeaderInfo object, and modifying the operator in the loop condition. The "additional emptiness condition" is no longer necessary with this. The open/closed property was removed from HeaderInfo in an earlier commit, but bringing it back in to simplify the loop building makes more sense. Also expanded tests for evaluation order of range bounds.
15 lines
218 B
Kotlin
Vendored
15 lines
218 B
Kotlin
Vendored
fun test(a: Int, b: Int): Int {
|
|
var sum = 0
|
|
for (i in a until b) {
|
|
sum = sum * 10 + i
|
|
}
|
|
return sum
|
|
}
|
|
|
|
// 0 iterator
|
|
// 0 getStart
|
|
// 0 getEnd
|
|
// 0 getFirst
|
|
// 0 getLast
|
|
// 0 getStep
|
|
// 1 IF_ICMP |