Files
kotlin-fork/backend.native/tests/external/codegen/box/ranges/forInRangeToConstWithOverflow.kt
T
2017-11-16 17:21:48 +03:00

12 lines
266 B
Kotlin

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"
}