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

16 lines
288 B
Kotlin
Vendored

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