ac7ee9d3f5
This means the subject expression and the common data flow info of all entries' conditions
25 lines
374 B
Kotlin
25 lines
374 B
Kotlin
fun foo(x: Number, y: Int) {
|
|
when (x) {
|
|
x as Int -> x : Int
|
|
y -> {}
|
|
else -> {}
|
|
}
|
|
<!TYPE_MISMATCH!>x<!> : Int
|
|
}
|
|
|
|
fun bar(x: Number) {
|
|
when (x) {
|
|
x as Int -> x : Int
|
|
else -> {}
|
|
}
|
|
x : Int
|
|
}
|
|
|
|
fun whenWithoutSubject(x: Number) {
|
|
when {
|
|
(x as Int) == 42 -> x : Int
|
|
else -> {}
|
|
}
|
|
x : Int
|
|
}
|