Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/kt12908.kt
T
Steven Schäfer eec25dbea2 Avoid true condition generation for do while loop, since it confuses the Java verifier.
Change-Id: I96eca6623a91a8365090768f42c6e865b612e1cc
2019-03-06 16:04:23 +01:00

21 lines
237 B
Kotlin
Vendored

var field: Int = 0
fun next(): Int {
return ++field
}
fun box(): String {
val task: String
do {
if (next() % 2 == 0) {
task = "OK"
break
}
}
while (true)
return task
}