mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
30 lines
596 B
Kotlin
Vendored
30 lines
596 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
const val M = UInt.MIN_VALUE
|
|
|
|
fun f(a: UInt): 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
|
|
// 0 INVOKESTATIC kotlin/UInt.constructor-impl
|
|
// 0 INVOKE\w+ kotlin/UInt.(un)?box-impl
|
|
|
|
// JVM_TEMPLATES
|
|
// 1 IF
|
|
|
|
// JVM_IR_TEMPLATES
|
|
// 0 IF
|
|
// 0 LINENUMBER 7
|