Added information about anonymous initializers to cfg & proper checks

This commit is contained in:
svtk
2011-11-01 18:54:33 +04:00
parent ecdceb4447
commit eab7fdf4bc
6 changed files with 109 additions and 9 deletions
@@ -0,0 +1,41 @@
== AnonymousInitializers ==
class AnonymousInitializers() {
val k = 34
val i: Int
{
$i = 12
}
val j: Int
get() = 20
{
$i = 13
}
}
---------------------
l0:
<START> NEXT:[r(34)] PREV:[]
r(34) NEXT:[w(k)] PREV:[<START>]
w(k) NEXT:[r(12)] PREV:[r(34)]
r(12) NEXT:[w($i)] PREV:[w(k)]
w($i) NEXT:[r(13)] PREV:[r(12)]
r(13) NEXT:[w($i)] PREV:[w($i)]
w($i) NEXT:[<END>] PREV:[r(13)]
l1:
<END> NEXT:[] PREV:[w($i)]
error:
<ERROR> NEXT:[] PREV:[]
=====================
== k ==
val k = 34
---------------------
l0:
<START> NEXT:[r(34)] PREV:[]
r(34) NEXT:[<END>] PREV:[<START>]
l1:
<END> NEXT:[] PREV:[r(34)]
error:
<ERROR> NEXT:[] PREV:[]
=====================
@@ -0,0 +1,15 @@
class AnonymousInitializers() {
val k = 34
val i: Int
{
$i = 12
}
val j: Int
get() = 20
{
$i = 13
}
}
@@ -1,3 +1,15 @@
== Test ==
class Test {
var x : Int;
}
---------------------
l0:
<START> NEXT:[<END>] PREV:[]
l1:
<END> NEXT:[] PREV:[<START>]
error:
<ERROR> NEXT:[] PREV:[]
=====================
== assignments ==
fun assignments() : Unit {
var x = 1