[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
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
@@ -37,7 +37,7 @@ fun test() {
y: Int -> fun(): Int {return 1}
}
x4 checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Int, Function0<Int>>>() }
x4 checkType { _<Function1<Int, Function0<Int>>>() }
{ y: Int -> fun(): Int {return 1} }
}
@@ -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
}