FIR DFA: when removing a variable, move type statements about dependents
val c = C("...")
val d = c
if (c.x == null) return
c.x.length // c.x has type String
d.x.length // d.x -> c.x through d -> c
c = C(null) // remove alias d -> c
d.x.length // info from c.x moved to d.x
^KT-54824 Fixed
This commit is contained in:
+1
-1
@@ -73,5 +73,5 @@ fun test5() {
|
||||
c = C(null)
|
||||
x.length // ok
|
||||
c.x<!UNSAFE_CALL!>.<!>length // bad
|
||||
d.x<!UNSAFE_CALL!>.<!>length // ok
|
||||
d.x.length // ok
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user