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
+23
View File
@@ -0,0 +1,23 @@
namespace localObjects {
object ~A~A {
~x~val x : Int
}
class Foo {
~foo()~fun foo() : Int
}
fun test() {
`A`A.`x`x
val b = object : Foo {
}
b.`foo()`foo()
object ~B~B {
~B.foo()~fun foo() {}
}
`B`B.`B.foo()`foo()
}
val bb = `!`B.foo()
}