Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt
T
2019-02-14 12:31:42 +03:00

17 lines
322 B
Kotlin
Vendored

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