Files
kotlin/compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongConst.kt
Mark Punzalan 7b153b2b68 Move building of "not empty" condition (used to check if loop is empty)
from ForLoopsLowering into ForLoopHeader, reducing the building logic in
ForLoopsLowering.
2019-04-04 09:07:19 +02:00

14 lines
176 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
const val N = 42L
fun test(): Long {
var sum = 0L
for (i in 1L .. N) {
sum += i
}
return sum
}
// 1 LCMP
// 0 IFEQ
// 1 IFGT