Qualified 'this' for classes

This commit is contained in:
Andrey Breslav
2011-03-28 22:45:16 +04:00
parent f7c76a0d4d
commit ad7115ce20
18 changed files with 196 additions and 48 deletions
+22
View File
@@ -0,0 +1,22 @@
class Dup {
fun Dup() : Unit {
this<error>@Dup</error>
}
}
class A {
fun foo() {
this@A
this<error>@a</error>
this
}
val x = this@A.foo()
val y = this.foo()
val z = foo()
}
fun foo() {
<error>this</error>
this<error>@a</error>
}