More accurate CFG for local class constructors (now they are not considered unconditionally executed) #KT-10042 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-03-21 17:35:53 +03:00
parent 8756cba2f5
commit b975b7d26e
15 changed files with 155 additions and 36 deletions
@@ -0,0 +1,19 @@
== foo ==
fun foo() {
var x: String
class A {
init {
x = ""
}
}
x.length
}
---------------------
"" <v0>: String NEW: r("") -> <v0>
x = "" !<v1>: *
{ x = "" } !<v1>: * COPY
x <v2>: {<: CharSequence} NEW: r(x) -> <v2>
length <v3>: * NEW: r(length|<v2>) -> <v3>
x.length <v3>: * COPY
{ var x: String class A { init { x = "" } } x.length } <v3>: * COPY
=====================