Support for local objects

This commit is contained in:
Andrey Breslav
2011-06-03 16:02:26 +04:00
parent 36470388c4
commit f0b8ef6946
11 changed files with 132 additions and 30 deletions
+24
View File
@@ -57,3 +57,27 @@ namespace nestedObejcts {
val d = A.B.A
val e = B.<error>A</error>.B
}
namespace localObjects {
object A {
val x : Int
}
class Foo {
fun foo() : Int
}
fun test() {
A.x
val b = object : Foo {
}
b.foo()
object B {
fun foo() {}
}
B.foo()
}
val bb = <error>B</error>.foo()
}