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:
pyos
2022-11-07 13:58:35 +01:00
committed by teamcity
parent 3cea2d7243
commit 2ae06a8d46
6 changed files with 65 additions and 31 deletions
@@ -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
}