Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/kt12908_2.kt
T

23 lines
337 B
Kotlin
Vendored

// LANGUAGE: -ProhibitSimplificationOfNonTrivialConstBooleanExpressions
// IGNORE_FIR_DIAGNOSTICS
var field: Int = 0
fun next(): Int {
return ++field
}
fun box(): String {
val task: String
do {
if (next() % 2 == 0) {
task = "OK"
break
}
}
while (!false)
return task
}