Files
kotlin/compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt
Roman Artemev cc14442be1 Add tests for primitive companion object
Update test data
2018-08-24 14:58:42 +03:00

13 lines
292 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
const val M = Int.MAX_VALUE
fun box(): String {
var step = 0
for (i in M .. M) {
++step
if (step > 1) throw AssertionError("Should be executed once")
}
if (step != 1) throw AssertionError("Should be executed once")
return "OK"
}