Added tests for 'super' resolved calls

This commit is contained in:
Svetlana Isakova
2014-07-10 17:17:13 +04:00
parent 11ea241efb
commit 22624186f6
12 changed files with 75 additions and 10 deletions
@@ -0,0 +1,9 @@
open class A {
open fun foo() {}
}
class B: A() {
override fun foo() {
<caret>super@B.foo()
}
}
@@ -0,0 +1,18 @@
open class A {
open fun foo() {}
}
class B: A() {
override fun foo() {
<caret>super@B.foo()
}
}
Resolved call:
Resulting descriptor: Class{B}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -0,0 +1,5 @@
class A {
fun foo() {
<caret>this@A.foo()
}
}
@@ -0,0 +1,14 @@
class A {
fun foo() {
<caret>this@A.foo()
}
}
Resolved call:
Resulting descriptor: Class{A}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -0,0 +1,9 @@
open class A {
open fun foo() {}
}
class B: A() {
override fun foo() {
<caret>super.foo()
}
}
@@ -0,0 +1,18 @@
open class A {
open fun foo() {}
}
class B: A() {
override fun foo() {
<caret>super.foo()
}
}
Resolved call:
Resulting descriptor: Class{B}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -0,0 +1,5 @@
class A {
fun foo() {
<caret>this.foo()
}
}
@@ -0,0 +1,14 @@
class A {
fun foo() {
<caret>this.foo()
}
}
Resolved call:
Resulting descriptor: Class{A}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -0,0 +1,5 @@
class A {
fun foo() {}
}
fun A.bar() = <caret>this.foo()
@@ -0,0 +1,14 @@
class A {
fun foo() {}
}
fun A.bar() = <caret>this.foo()
Resolved call:
Resulting descriptor: AExt{fun A.bar(): Unit}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER