Files
kotlin/compiler/testData/diagnostics/tests/controlFlowAnalysis/varInitializationInIfInCycle.kt
Svetlana Isakova 7d46ff951e Jump after 'for' cycle to loop parameter change.
Not to the cycle body.
2014-03-07 21:08:17 +04:00

16 lines
252 B
Kotlin

fun foo(numbers: Collection<Int>) {
for (i in numbers) {
val b: Boolean
if (1 < 2) {
b = false
}
else {
b = true
}
use(b)
continue
}
}
fun use(vararg a: Any?) = a