Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenIn.kt
T
Alexander Udalov ac7ee9d3f5 Retain data flow info after when-expressions
This means the subject expression and the common data flow info of all entries'
conditions
2012-11-16 17:56:23 +04:00

14 lines
246 B
Kotlin

fun foo(x: Int, list: List<Int>?) {
when (x) {
in list!! -> list : List<Int>
else -> {}
}
}
fun whenWithoutSubject(x: Int, list: List<Int>?) {
when {
x in list!! -> list : List<Int>
else -> {}
}
}