[FIR] Infer type of elvis from lhs if rhs is Nothing
^KT-50875 Fixed
This commit is contained in:
+2
-2
@@ -20,9 +20,9 @@ fun test1(): Int {
|
||||
}
|
||||
|
||||
fun test2(): Int {
|
||||
val x: String = when {
|
||||
val x: String = <!INITIALIZER_TYPE_MISMATCH!>when {
|
||||
true -> Any()
|
||||
else -> null
|
||||
} ?: return 0
|
||||
} ?: return 0<!>
|
||||
return x.hashCode()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user