Render 'defined in' in resolved call tests

This commit is contained in:
Svetlana Isakova
2014-08-18 19:14:42 +04:00
parent bbeb44e6ee
commit 67aad53db7
55 changed files with 82 additions and 83 deletions
@@ -8,8 +8,8 @@ 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
Candidate descriptor: fun <T, S, R> foo(t: T, f: (T) -> S, g: (S) -> R): Unit defined in root package
Resulting descriptor: fun <T, S, R> foo(t: Int, f: (Int) -> String, g: (String) -> Int): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,8 +7,8 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(f: () -> T): Unit
Resulting descriptor: fun <T> foo(f: () -> ???): Unit
Candidate descriptor: fun <T> foo(f: () -> T): Unit defined in root package
Resulting descriptor: fun <T> foo(f: () -> ???): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,8 +7,8 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit
Resulting descriptor: fun <T> foo(f: (???) -> String): Unit
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit defined in root package
Resulting descriptor: fun <T> foo(f: (???) -> String): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,8 +7,8 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit
Resulting descriptor: fun <T> foo(f: (Int) -> String): Unit
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit defined in root package
Resulting descriptor: fun <T> foo(f: (Int) -> String): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,7 +7,7 @@ fun test() {
Resolved call:
Resulting descriptor: fun foo(f: (Int) -> String): Unit
Resulting descriptor: fun foo(f: (Int) -> String): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,7 +7,7 @@ fun test() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Resulting descriptor: fun foo(): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,8 +9,8 @@ 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
Candidate descriptor: fun <T> foo(t: T, l: List<T>): Unit defined in root package
Resulting descriptor: fun <T> foo(t: Comparable<out Any?>, l: List<Comparable<out Any?>>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,8 +9,8 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> foo(t: T): Unit
Resulting descriptor: fun <T> foo(t: A): Unit
Candidate descriptor: fun <T> foo(t: T): Unit defined in root package
Resulting descriptor: fun <T> foo(t: A): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,8 +9,8 @@ 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
Candidate descriptor: fun <T> foo(t: T, l: MutableList<T>): Unit defined in root package
Resulting descriptor: fun <T> foo(t: ???, l: MutableList<???>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,8 +7,8 @@ fun test() {
Resolved call:
Candidate descriptor: fun <T> foo(l: List<T>): Unit
Resulting descriptor: fun <T> foo(l: List<???>): Unit
Candidate descriptor: fun <T> foo(l: List<T>): Unit defined in root package
Resulting descriptor: fun <T> foo(l: List<???>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -10,7 +10,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A, b: B): Unit
Resulting descriptor: fun foo(a: A, b: B): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -10,7 +10,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A, b: B): Unit
Resulting descriptor: fun foo(a: A, b: B): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,7 +9,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A): Unit
Resulting descriptor: fun foo(a: A): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,7 +9,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A): Unit
Resulting descriptor: fun foo(a: A): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,7 +9,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A): Unit
Resulting descriptor: fun foo(a: A): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,7 +7,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Resulting descriptor: fun foo(): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -11,8 +11,8 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> foo(t: T): Unit
Resulting descriptor: fun <T> foo(t: List<???>): Unit
Candidate descriptor: fun <T> foo(t: T): Unit defined in root package
Resulting descriptor: fun <T> foo(t: List<???>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -11,8 +11,8 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> foo(t: T): Unit
Resulting descriptor: fun <T> foo(t: MutableList<???>): Unit
Candidate descriptor: fun <T> foo(t: T): Unit defined in root package
Resulting descriptor: fun <T> foo(t: MutableList<???>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -11,7 +11,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(a: A, s: String): Unit
Resulting descriptor: fun foo(a: A, s: String): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -5,7 +5,7 @@ annotation class MyA(val i: Int)
Resolved call:
Resulting descriptor: constructor MyA(i: Int)
Resulting descriptor: constructor MyA(i: Int) defined in MyA
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -5,8 +5,8 @@ class B: <caret>A() {}
Resolved call:
Resulting descriptor: constructor A()
Resulting descriptor: constructor A() defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -5,7 +5,7 @@ fun foo(array: Array<Int>) {
Resolved call:
Resulting descriptor: fun get(index: Int): Int
Resulting descriptor: fun get(index: Int): Int defined in kotlin.Array
Explicit receiver kind = THIS_OBJECT
This object = array {Array<Int>}
@@ -13,4 +13,4 @@ Receiver argument = NO_RECEIVER
Value arguments mapping:
SUCCESS index : Int = 1
SUCCESS index : Int = 1
@@ -9,8 +9,8 @@ fun bar(a: A) {
Resolved call:
Resulting descriptor: fun A.foo(): Unit
Resulting descriptor: fun A.foo(): Unit defined in root package
Explicit receiver kind = RECEIVER_ARGUMENT
This object = NO_RECEIVER
Receiver argument = a {A}
Receiver argument = a {A}
@@ -9,7 +9,7 @@ fun bar(a: A) {
Resolved call:
Resulting descriptor: fun foo(): Unit
Resulting descriptor: fun foo(): Unit defined in A
Explicit receiver kind = THIS_OBJECT
This object = a {A}
@@ -5,8 +5,8 @@ fun bar(f: Int.()->Unit) {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Resulting descriptor: fun Int.invoke(): Unit defined in kotlin.ExtensionFunction0
Explicit receiver kind = BOTH_RECEIVERS
This object = f {ExtensionFunction0<Int, Unit>}
Receiver argument = 1 {Int}
Receiver argument = 1 {Int}
@@ -5,7 +5,7 @@ fun bar(f: ()->Unit) {
Resolved call:
Resulting descriptor: fun invoke(): Unit
Resulting descriptor: fun invoke(): Unit defined in kotlin.Function0
Explicit receiver kind = THIS_OBJECT
This object = f {Function0<Unit>}
@@ -9,7 +9,7 @@ trait A {
Resolved call:
Resulting descriptor: val foo: Int.() -> Unit
Resulting descriptor: val foo: Int.() -> Unit defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = Class{A}
@@ -9,8 +9,8 @@ trait A {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Resulting descriptor: fun Int.invoke(): Unit defined in kotlin.ExtensionFunction0
Explicit receiver kind = BOTH_RECEIVERS
This object = foo {ExtensionFunction0<Int, Unit>}
Receiver argument = 1 {Int}
Receiver argument = 1 {Int}
@@ -9,7 +9,7 @@ fun test(a: A) {
Resolved call:
Resulting descriptor: val foo: (Int) -> Int
Resulting descriptor: val foo: (Int) -> Int defined in A
Explicit receiver kind = THIS_OBJECT
This object = a {A}
@@ -9,7 +9,7 @@ fun test(a: A) {
Resolved call:
Resulting descriptor: fun invoke(p1: Int): Int
Resulting descriptor: fun invoke(p1: Int): Int defined in kotlin.Function1
Explicit receiver kind = THIS_OBJECT
This object = foo {Function1<Int, Int>}
@@ -13,8 +13,8 @@ fun bar(a: A, b: B) {
Resolved call:
Resulting descriptor: fun B.foo(): Unit
Resulting descriptor: fun B.foo(): Unit defined in A
Explicit receiver kind = RECEIVER_ARGUMENT
This object = AExt{fun A.<anonymous>(): Unit}
Receiver argument = b {B}
This object = AExt{fun A.<anonymous>(): Unit defined in bar}
Receiver argument = b {B}
@@ -15,8 +15,8 @@ fun bar(a: A, b: B) {
Resolved call:
Resulting descriptor: fun B.foo(): Unit
Resulting descriptor: fun B.foo(): Unit defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = AExt{fun A.<anonymous>(): Unit}
Receiver argument = BExt{fun B.<anonymous>(): Unit}
This object = AExt{fun A.<anonymous>(): Unit defined in bar}
Receiver argument = BExt{fun B.<anonymous>(): Unit defined in bar.<anonymous>}
@@ -9,8 +9,8 @@ fun A.bar() {
Resolved call:
Resulting descriptor: fun A.foo(): Unit
Resulting descriptor: fun A.foo(): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = AExt{fun A.bar(): Unit}
Receiver argument = AExt{fun A.bar(): Unit defined in root package}
@@ -9,8 +9,8 @@ fun A.bar() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Resulting descriptor: fun foo(): Unit defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = AExt{fun A.bar(): Unit}
This object = AExt{fun A.bar(): Unit defined in root package}
Receiver argument = NO_RECEIVER
@@ -8,7 +8,7 @@ class A {
Resolved call:
Resulting descriptor: fun foo(): Unit
Resulting descriptor: fun foo(): Unit defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = Class{A}
@@ -9,8 +9,8 @@ fun bar(f: Foo) {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Resulting descriptor: fun Int.invoke(): Unit defined in Foo
Explicit receiver kind = BOTH_RECEIVERS
This object = f {Foo}
Receiver argument = 1 {Int}
Receiver argument = 1 {Int}
@@ -11,8 +11,8 @@ fun bar(f: Foo, i: Int) {
Resolved call:
Resulting descriptor: fun Int.invoke(): Unit
Resulting descriptor: fun Int.invoke(): Unit defined in Foo
Explicit receiver kind = THIS_OBJECT
This object = f {Foo}
Receiver argument = IntExt{fun Int.<anonymous>(): Unit}
Receiver argument = IntExt{fun Int.<anonymous>(): Unit defined in bar}
@@ -9,7 +9,7 @@ fun test() = <caret>A(1)
Resolved call:
Resulting descriptor: class object
Resulting descriptor: class object defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -9,7 +9,7 @@ fun test() = A<caret>(1)
Resolved call:
Resulting descriptor: fun invoke(i: Int): Int
Resulting descriptor: fun invoke(i: Int): Int defined in A.<class-object-for-A>
Explicit receiver kind = THIS_OBJECT
This object = A {<class-object-for-A>}
@@ -10,7 +10,7 @@ fun test() = A.<caret>ONE(1)
Resolved call:
Resulting descriptor: enum entry ONE : A
Resulting descriptor: enum entry ONE : A defined in A
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -10,7 +10,7 @@ fun test() = A.ONE<caret>(1)
Resolved call:
Resulting descriptor: fun invoke(i: Int): Int
Resulting descriptor: fun invoke(i: Int): Int defined in A
Explicit receiver kind = THIS_OBJECT
This object = ONE {A}
@@ -7,7 +7,7 @@ fun test() = <caret>A(1)
Resolved call:
Resulting descriptor: object A
Resulting descriptor: object A defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,7 +7,7 @@ fun test() = A<caret>(1)
Resolved call:
Resulting descriptor: fun invoke(i: Int): Int
Resulting descriptor: fun invoke(i: Int): Int defined in A
Explicit receiver kind = THIS_OBJECT
This object = A {A}
@@ -8,8 +8,8 @@ fun bar(f: Foo) {
Resolved call:
Resulting descriptor: fun Foo.invoke(): Unit
Resulting descriptor: fun Foo.invoke(): Unit defined in root package
Explicit receiver kind = RECEIVER_ARGUMENT
This object = NO_RECEIVER
Receiver argument = f {Foo}
Receiver argument = f {Foo}
@@ -9,7 +9,7 @@ fun bar(f: Foo) {
Resolved call:
Resulting descriptor: fun invoke(): Unit
Resulting descriptor: fun invoke(): Unit defined in Foo
Explicit receiver kind = THIS_OBJECT
This object = f {Foo}
@@ -11,7 +11,7 @@ fun test() {
Resolved call:
Resulting descriptor: val baz: Foo
Resulting descriptor: val baz: Foo defined in Foo.<class-object-for-Foo>
Explicit receiver kind = THIS_OBJECT
This object = Foo {<class-object-for-Foo>}
@@ -6,7 +6,7 @@ fun test() {
Resolved call:
Resulting descriptor: val EMPTY: IntRange
Resulting descriptor: val EMPTY: IntRange defined in kotlin.IntRange.<class-object-for-IntRange>
Explicit receiver kind = THIS_OBJECT
This object = IntRange {<class-object-for-IntRange>}
@@ -9,7 +9,7 @@ fun test() {
Resolved call:
Resulting descriptor: val baz: Int
Resulting descriptor: val baz: Int defined in Foo
Explicit receiver kind = THIS_OBJECT
This object = Foo {Foo}
@@ -41,8 +41,8 @@ val fail: Nothing get() = throw Exception()
Resolved call:
Resulting descriptor: fun String.plus(): Unit
Resulting descriptor: fun String.plus(): Unit defined in Title
Explicit receiver kind = RECEIVER_ARGUMENT
This object = TitleExt{fun Title.<anonymous>(): Unit}
Receiver argument = "Foo" {String}
This object = TitleExt{fun Title.<anonymous>(): Unit defined in result.<anonymous>.<anonymous>}
Receiver argument = "Foo" {String}
@@ -10,8 +10,8 @@ fun bar() {
Resolved call:
Candidate descriptor: fun <T> doSmth(l: List<T>): Unit
Resulting descriptor: fun <T> doSmth(l: List<???>): Unit
Candidate descriptor: fun <T> doSmth(l: List<T>): Unit defined in root package
Resulting descriptor: fun <T> doSmth(l: List<???>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -8,8 +8,8 @@ fun <T> bar(f: () -> T): T = f()
Resolved call:
Candidate descriptor: fun <T> bar(f: () -> T): T
Resulting descriptor: fun <T> bar(f: () -> Unit): Unit
Candidate descriptor: fun <T> bar(f: () -> T): T defined in root package
Resulting descriptor: fun <T> bar(f: () -> Unit): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -7,7 +7,7 @@ fun bar() {
Resolved call:
Resulting descriptor: fun foo(): Unit
Resulting descriptor: fun foo(): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -15,4 +15,4 @@ Resulting descriptor: Class{B}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
Receiver argument = NO_RECEIVER
Receiver argument = NO_RECEIVER
@@ -7,7 +7,7 @@ fun A.bar() = <caret>this.foo()
Resolved call:
Resulting descriptor: AExt{fun A.bar(): Unit}::this
Resulting descriptor: AExt{fun A.bar(): Unit defined in root package}::this
Explicit receiver kind = NO_EXPLICIT_RECEIVER
This object = NO_RECEIVER
@@ -53,7 +53,6 @@ public interface DescriptorRenderer extends Renderer<DeclarationDescriptor> {
.setModifiers().build();
DescriptorRenderer COMPACT_WITH_SHORT_TYPES = new DescriptorRendererBuilder()
.setWithDefinedIn(false)
.setModifiers()
.setShortNames(true)
.setIncludeSynthesizedParameterNames(false).build();