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,12 @@
|
||||
enum class My { A, B }
|
||||
|
||||
fun test(a: My): String {
|
||||
val q: String?
|
||||
|
||||
when (a) {
|
||||
My.A -> q = "1"
|
||||
My.B -> q = "2"
|
||||
}
|
||||
// When is exhaustive
|
||||
return <!DEBUG_INFO_SMARTCAST!>q<!>
|
||||
}
|
||||
Reference in New Issue
Block a user