Solution for KT-7838: now data flow information at the end of when expression is determined correctly.
#KT-7838 Fixed.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class A
|
||||
|
||||
fun test(a: Any): String {
|
||||
val q: String? = null
|
||||
|
||||
when (a) {
|
||||
is A -> q!!
|
||||
}
|
||||
// When is not exhaustive
|
||||
return <!TYPE_MISMATCH!>q<!>
|
||||
}
|
||||
Reference in New Issue
Block a user