FIR DFA: copy logic statements to aliases before removing variables

^KT-54744 Fixed
This commit is contained in:
pyos
2022-11-01 12:45:38 +01:00
committed by teamcity
parent 31eaa211b7
commit 0781cd12d4
4 changed files with 19 additions and 33 deletions
@@ -9,7 +9,7 @@ fun test1() {
x.length // ok
c.x.length // ok
c = C(null)
x<!UNSAFE_CALL!>.<!>length // ok
x.length // ok
c.x<!UNSAFE_CALL!>.<!>length // bad
}
@@ -18,10 +18,10 @@ fun test2() {
val x = c.x
if (x == null) return
while (true) {
x<!UNSAFE_CALL!>.<!>length // ok
x.length // ok
c.x<!UNSAFE_CALL!>.<!>length // bad
c = C(null)
x<!UNSAFE_CALL!>.<!>length // ok
x.length // ok
c.x<!UNSAFE_CALL!>.<!>length // bad
}
}