Render candidate and resulting descriptors in resolved call tests

This commit is contained in:
Svetlana Isakova
2014-07-10 16:33:50 +04:00
parent bff579dd1e
commit 11ea241efb
43 changed files with 157 additions and 42 deletions
@@ -8,6 +8,9 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T, S, R> foo(t: T, f: (T) -> S, g: (S) -> R): Unit
Resulting descriptor: fun <T, S, R> foo(t: Int, f: (Int) -> String, g: (String) -> Int): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,9 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(f: () -> T): Unit
Resulting descriptor: fun <T> foo(f: () -> ???): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,9 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit
Resulting descriptor: fun <T> foo(f: (???) -> String): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,9 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit
Resulting descriptor: fun <T> foo(f: (Int) -> String): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,8 @@ fun test() {
Resolved call:
Resulting descriptor: fun foo(f: (Int) -> String): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,8 @@ fun test() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,9 @@ fun test(a: Any, ls: List<String>) {
Resolved call:
Candidate descriptor: fun <T> foo(t: T, l: List<T>): Unit
Resulting descriptor: fun <T> foo(t: Comparable<out Any?>, l: List<Comparable<out Any?>>): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,9 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> foo(t: T): Unit
Resulting descriptor: fun <T> foo(t: A): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,9 @@ fun test(ls: MutableList<String>) {
Resolved call:
Candidate descriptor: fun <T> foo(t: T, l: MutableList<T>): Unit
Resulting descriptor: fun <T> foo(t: ???, l: MutableList<???>): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,9 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(l: List<T>): Unit
Resulting descriptor: fun <T> foo(l: List<???>): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -10,6 +10,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A, b: B): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -10,6 +10,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A, b: B): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -11,6 +11,9 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> foo(t: T): Unit
Resulting descriptor: fun <T> foo(t: List<???>): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -11,6 +11,9 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> foo(t: T): Unit
Resulting descriptor: fun <T> foo(t: MutableList<???>): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -11,6 +11,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A, s: String): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ fun bar(a: A) {
Resolved call:
Resulting descriptor: fun A.foo(): Unit
Explicit receiver kind = RECEIVER_ARGUMENT
This object = NO_RECEIVER
Receiver argument = a
Receiver argument = a {A}
@@ -9,6 +9,8 @@ fun bar(a: A) {
Resolved call:
Resulting descriptor: fun foo(): Unit
Explicit receiver kind = THIS_OBJECT
This object = a
This object = a {A}
Receiver argument = NO_RECEIVER
@@ -5,6 +5,8 @@ fun bar(f: Int.()->Unit) {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Explicit receiver kind = BOTH_RECEIVERS
This object = f
Receiver argument = 1
This object = f {ExtensionFunction0<Int, Unit>}
Receiver argument = 1 {Int}
@@ -5,6 +5,8 @@ fun bar(f: ()->Unit) {
Resolved call:
Resulting descriptor: fun invoke(): Unit
Explicit receiver kind = THIS_OBJECT
This object = f
This object = f {Function0<Unit>}
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ trait A {
Resolved call:
Resulting descriptor: val foo: Int.() -> Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = Class{A}
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ trait A {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Explicit receiver kind = BOTH_RECEIVERS
This object = foo
Receiver argument = 1
This object = foo {ExtensionFunction0<Int, Unit>}
Receiver argument = 1 {Int}
@@ -9,6 +9,8 @@ fun test(a: A) {
Resolved call:
Resulting descriptor: val foo: (Int) -> Int
Explicit receiver kind = THIS_OBJECT
This object = a
Receiver argument = NO_RECEIVER
This object = a {A}
Receiver argument = NO_RECEIVER
@@ -9,8 +9,10 @@ fun test(a: A) {
Resolved call:
Resulting descriptor: fun invoke(p1: Int): Int
Explicit receiver kind = THIS_OBJECT
This object = foo
This object = foo {Function1<Int, Int>}
Receiver argument = NO_RECEIVER
Value arguments mapping:
@@ -15,6 +15,8 @@ fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()
Resolved call:
Resulting descriptor: fun B.foo(): Unit
Explicit receiver kind = RECEIVER_ARGUMENT
This object = A
Receiver argument = b
This object = AExt{fun A.<anonymous>(): Unit}
Receiver argument = b {B}
@@ -17,6 +17,8 @@ fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()
Resolved call:
Resulting descriptor: fun B.foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = A
Receiver argument = B
This object = AExt{fun A.<anonymous>(): Unit}
Receiver argument = BExt{fun B.<anonymous>(): Unit}
@@ -9,6 +9,8 @@ fun A.bar() {
Resolved call:
Resulting descriptor: fun A.foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = A
Receiver argument = AExt{fun A.bar(): Unit}
@@ -9,6 +9,8 @@ fun A.bar() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = A
This object = AExt{fun A.bar(): Unit}
Receiver argument = NO_RECEIVER
@@ -8,6 +8,8 @@ class A {
Resolved call:
Resulting descriptor: fun foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = Class{A}
Receiver argument = NO_RECEIVER
@@ -9,6 +9,8 @@ fun bar(f: Foo) {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Explicit receiver kind = BOTH_RECEIVERS
This object = f
Receiver argument = 1
This object = f {Foo}
Receiver argument = 1 {Int}
@@ -13,6 +13,8 @@ fun <T, R> with(receiver: T, f: T.() -> R) : R = throw Exception()
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Explicit receiver kind = THIS_OBJECT
This object = f
Receiver argument = Int
This object = f {Foo}
Receiver argument = IntExt{fun Int.<anonymous>(): Unit}
@@ -8,6 +8,8 @@ fun bar(f: Foo) {
Resolved call:
Resulting descriptor: fun Foo.invoke(): Unit
Explicit receiver kind = RECEIVER_ARGUMENT
This object = NO_RECEIVER
Receiver argument = f
Receiver argument = f {Foo}
@@ -9,6 +9,8 @@ fun bar(f: Foo) {
Resolved call:
Resulting descriptor: fun invoke(): Unit
Explicit receiver kind = THIS_OBJECT
This object = f
This object = f {Foo}
Receiver argument = NO_RECEIVER
@@ -41,6 +41,8 @@ val fail: Nothing get() = throw Exception()
Resolved call:
Resulting descriptor: fun String.plus(): Unit
Explicit receiver kind = RECEIVER_ARGUMENT
This object = Title
Receiver argument = "Foo"
This object = TitleExt{fun Title.<anonymous>(): Unit}
Receiver argument = "Foo" {String}
@@ -7,6 +7,8 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,8 @@ class A {
Resolved call:
Resulting descriptor: Class{A}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,8 @@ class A {
Resolved call:
Resulting descriptor: Class{A}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,6 +7,8 @@ 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