FIR DFA: route data flow through anonymous objects

^KT-44515 Fixed
This commit is contained in:
pyos
2022-12-11 16:40:12 +01:00
committed by Dmitriy Novozhilov
parent 17ee8f3a7b
commit 0dd949bb36
16 changed files with 365 additions and 405 deletions
@@ -16,7 +16,7 @@ fun foo(): Int {
k.run()
val d: Int = c
// a is captured so smart cast is not possible
return d + a
return d <!NONE_APPLICABLE!>+<!> a
}
else return -1
}
@@ -15,7 +15,7 @@ fun foo(): Int {
k.run()
val d: Int = c
// a is not null because of k constructor, but we do not know it
return a <!UNSAFE_OPERATOR_CALL!>+<!> d
return a + d
}
else return -1
}
@@ -11,7 +11,7 @@ fun foo(): Int {
}
k.run()
val d: Int = c
return a <!UNSAFE_OPERATOR_CALL!>+<!> d
return a + d
}
else return -1
}
@@ -15,7 +15,7 @@ fun foo(): Int {
}
k.run()
val d: Int = c
return a <!UNSAFE_OPERATOR_CALL!>+<!> d
return a + d
}
else return -1
}
@@ -7,5 +7,5 @@ abstract class A(val s: String) {
fun foo(o: String?): Int {
val a = object : A(o!!){}
a.bar()
return o<!UNSAFE_CALL!>.<!>length
return o.length
}