[FIR] Introduce new algorithm for building CFG for declarations

This commit is contained in:
Dmitriy Novozhilov
2020-06-05 15:47:57 +03:00
parent 950bbfe3a5
commit 87859b0faa
95 changed files with 16070 additions and 13199 deletions
@@ -13,5 +13,5 @@ fun myFun() {
val myParent = MyParent()
myParent.child?.nullableString ?: run { return }
myParent.child.<!INAPPLICABLE_CANDIDATE!>notNull<!> // <- No smart cast in plugin
myParent.child.notNull // <- No smart cast in plugin
}
@@ -17,5 +17,5 @@ fun smartIt(p1: String?, p2: String?) {
p1.<!INAPPLICABLE_CANDIDATE!>length<!>
p2 ?: callItContracted { return }
p2.<!INAPPLICABLE_CANDIDATE!>length<!>
p2.length
}
@@ -6,5 +6,5 @@ public fun foo(p: String?): Int {
p!!.length
} while (!x())
// Literal is not called so p.length is unsafe
return p.<!INAPPLICABLE_CANDIDATE!>length<!>
return p.length
}