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
@@ -5,24 +5,24 @@ class A() {
|
||||
fun f(): Unit {
|
||||
var x: Int? = 1
|
||||
x = null
|
||||
x <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
x + 1
|
||||
x <!UNSAFE_INFIX_CALL!>plus<!> 1
|
||||
x <!UNSAFE_OPERATOR_CALL!><<!> 1
|
||||
x <!UNSAFE_OPERATOR_CALL!>+=<!> 1
|
||||
<!ASSIGNMENT_TYPE_MISMATCH!>x += 1<!>
|
||||
|
||||
x == 1
|
||||
x != 1
|
||||
|
||||
<!EQUALITY_NOT_APPLICABLE!>A() == 1<!>
|
||||
|
||||
<!EQUALITY_NOT_APPLICABLE!>x === "1"<!>
|
||||
<!EQUALITY_NOT_APPLICABLE!>x !== "1"<!>
|
||||
x === "1"
|
||||
x !== "1"
|
||||
|
||||
x === 1
|
||||
x !== 1
|
||||
|
||||
x<!UNSAFE_OPERATOR_CALL!>..<!>2
|
||||
<!ARGUMENT_TYPE_MISMATCH!>x<!> in 1..2
|
||||
x..2
|
||||
x in 1..2
|
||||
|
||||
val y : Boolean? = true
|
||||
false || <!CONDITION_TYPE_MISMATCH!>y<!>
|
||||
|
||||
Reference in New Issue
Block a user