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
@@ -7,14 +7,14 @@ class TestWithEquals {
|
||||
}
|
||||
|
||||
fun bar(i: Test?) {
|
||||
if (i == null) foo(<!ARGUMENT_TYPE_MISMATCH!>i<!>)
|
||||
if (i == null) foo(i)
|
||||
}
|
||||
|
||||
fun bar(i: TestWithEquals?) {
|
||||
if (i == null) foo(<!ARGUMENT_TYPE_MISMATCH!>i<!>)
|
||||
if (null == i) foo(<!ARGUMENT_TYPE_MISMATCH!>i<!>)
|
||||
if (i == null) foo(i)
|
||||
if (null == i) foo(i)
|
||||
when (i) {
|
||||
null -> foo(<!ARGUMENT_TYPE_MISMATCH!>i<!>)
|
||||
null -> foo(i)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ fun gav(i: TestWithEquals?, j: TestWithEquals?) {
|
||||
if (j == null) {
|
||||
if (i == j) foo(<!ARGUMENT_TYPE_MISMATCH!>i<!>)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user