FIR DFA: smartcast variable to Nothing? on null assignment
In order to make resolution still work for members not available from `Nothing`, we track the type without `Nothing?` and use that for resolution instead.
This commit is contained in:
committed by
teamcityserver
parent
7e2f15f532
commit
4726dcce40
@@ -8,7 +8,7 @@ fun foo(): Int {
|
||||
if (x != null) return x
|
||||
|
||||
val y: Int? = null
|
||||
if (y == null) return if (y != null) y else y
|
||||
if (y == null) return <!RETURN_TYPE_MISMATCH!>if (y != null) y else y<!>
|
||||
|
||||
val z: Int? = null
|
||||
if (z != null) return if (z == null) z else z
|
||||
|
||||
Reference in New Issue
Block a user