improved processing of local declarations in cfg construction

This commit is contained in:
svtk
2011-11-07 18:49:30 +04:00
parent d1787a5f6e
commit c71d9796a2
11 changed files with 662 additions and 162 deletions
@@ -0,0 +1,77 @@
class C() {
val a: Int = 1
class object {
val x : Int
{
$x = 1
}
fun foo() {
val b : Int = 1
doSmth(b)
}
}
}
fun doSmth(i: Int) {}
fun test1() {
val a = object {
val x : Int
{
$x = 1
}
}
}
object O {
val x : Int
{
$x = 1
}
}
fun test2() {
val b = 1
val a = object {
val x = b
}
}
fun test3() {
val a = object {
val y : Int
fun inner_bar() {
y = 10
}
}
}
fun test4() {
val a = object {
val x : Int
val y : Int
{
$x = 1
}
fun ggg() {
y = 10
}
}
}
fun test5() {
val a = object {
var x = 1
{
$x = 2
}
fun foo() {
x = 3
}
fun bar() {
x = 4
}
}
}