Qualified 'this' for classes
This commit is contained in:
@@ -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>
|
||||
}
|
||||
Reference in New Issue
Block a user