Files
kotlin/compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInUntilULongMinValue.kt
2020-05-13 13:54:35 +02:00

28 lines
510 B
Kotlin
Vendored

// WITH_RUNTIME
const val M = ULong.MIN_VALUE
fun f(a: ULong): Int {
var n = 0
for (i in a until M) {
n++
}
return n
}
// For "until" progressions in JVM IR, there is a check that the range is not empty: upper bound != MIN_VALUE.
// When the upper bound == const MIN_VALUE, the backend can eliminate the entire loop as dead code.
// 0 iterator
// 0 getStart
// 0 getEnd
// 0 getFirst
// 0 getLast
// 0 getStep
// JVM_TEMPLATES
// 1 IF
// JVM_IR_TEMPLATES
// 0 IF
// 0 LINENUMBER 7