Add more variable aliasing tests

This commit is contained in:
pyos
2022-11-07 13:10:17 +01:00
committed by teamcity
parent a8bef8ac81
commit 33363ba1fc
8 changed files with 216 additions and 4 deletions
@@ -61,3 +61,17 @@ fun test4(p: Boolean, q: Boolean) {
x.length // ok
c.x<!UNSAFE_CALL!>.<!>length // bad
}
fun test5() {
var c = C("...")
val d = c
val x = d.x
if (x == null) return
x.length // ok
c.x.length // ok
d.x.length // ok
c = C(null)
x.length // ok
c.x<!UNSAFE_CALL!>.<!>length // bad
d.x<!UNSAFE_CALL!>.<!>length // ok
}