Files
kotlin-fork/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions
T
2015-04-29 14:07:05 +02:00

54 lines
1.7 KiB
Plaintext

== foo ==
fun foo() {
"before"
object A {
init {
val a = 1
}
fun foo() {
val b = 2
}
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" object A { init { val a = 1 } fun foo() { val b = 2 } } "after" })
mark("before")
r("before") -> <v0>
3 mark({ val a = 1 })
v(val a = 1) INIT: in: {} out: {a=D}
r(1) -> <v1> INIT: in: {a=D} out: {a=D}
w(a|<v1>) INIT: in: {a=D} out: {a=ID}
2 jmp?(L2) INIT: in: {} out: {}
d(fun foo() { val b = 2 })
L2 [after local declaration]:
mark("after")
r("after") -> <v2>
L1:
1 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== foo ==
fun foo() {
val b = 2
}
---------------------
L3:
3 <START> INIT: in: {} out: {}
4 mark({ val b = 2 })
v(val b = 2) INIT: in: {} out: {b=D}
r(2) -> <v0> INIT: in: {b=D} out: {b=D}
w(b|<v0>) INIT: in: {b=D} out: {b=ID}
L4:
3 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================