[FIR] Support PreliminaryLoopVisitor in FIR DFA

This commit is contained in:
Dmitriy Novozhilov
2021-02-11 17:42:30 +03:00
parent 0e46a961a3
commit 5711a8d610
34 changed files with 294 additions and 106 deletions
@@ -6,5 +6,5 @@ fun foo(x: Int, f: () -> Unit, y: Int) {}
fun bar() {
var x: Int?
x = 4
foo(x, { x = null; x<!UNSAFE_CALL!>.<!>hashCode() }, x)
<!INAPPLICABLE_CANDIDATE!>foo<!>(x, { x = null; x<!UNSAFE_CALL!>.<!>hashCode() }, x)
}
@@ -2,8 +2,8 @@ public fun foo() {
var i: Any = 1
if (i is Int) {
while (i != 10) {
i++ // Here smart cast should not be performed due to a successor
i<!UNRESOLVED_REFERENCE!>++<!> // Here smart cast should not be performed due to a successor
i = ""
}
}
}
}
@@ -2,7 +2,7 @@ public fun foo() {
var i: Any = 1
if (i is Int) {
while (i != 10) {
i++
i<!UNRESOLVED_REFERENCE!>++<!>
}
}
}
}
@@ -13,5 +13,5 @@ fun list(start: String) {
e = e.next()
}
// e can never be null but we do not know it
e.hashCode()
}
e<!UNSAFE_CALL!>.<!>hashCode()
}