Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/When.fir.kt
T

19 lines
285 B
Kotlin
Vendored

fun bar(x: Int): Int = x + 1
fun foo() {
val x: Int? = null
if (x != null) {
when (x) {
0 -> bar(x)
else -> {}
}
}
when (x) {
0 -> { if (x == null) return }
else -> { if (x == null) return }
}
bar(x)
}