Files
kotlin-fork/compiler/testData/codegen/box/ranges/kt37370a.kt
T
2020-03-18 17:09:37 +03:00

27 lines
424 B
Kotlin
Vendored

// WITH_RUNTIME
import kotlin.test.*
fun testContinue7() {
var x = 0
fun inc() = ++x
for (i in 0..1) {
for (j in inc() downTo continue) {}
}
assertEquals(2, x)
}
fun testContinue8() {
var x = 0
fun inc() = ++x
for (i in 0..1) {
for (j in continue downTo inc()) {}
}
assertEquals(0, x)
}
fun box(): String {
testContinue7()
testContinue8()
return "OK"
}