Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.jet
T
2012-06-15 17:06:41 +04:00

17 lines
274 B
Plaintext

fun bar(x: Int): Int = x + 1
fun foo() {
val x: Int? = null
do {
bar(<!TYPE_MISMATCH!>x<!>)
} while (x == null)
bar(x)
val y: Int? = null
do {
bar(<!TYPE_MISMATCH!>y<!>)
} while (y != null)
bar(<!TYPE_MISMATCH!>y<!>)
}