diff --git a/compiler/visualizer/render-psi/src/org/jetbrains/kotlin/compiler/visualizer/PsiVisualizer.kt b/compiler/visualizer/render-psi/src/org/jetbrains/kotlin/compiler/visualizer/PsiVisualizer.kt index 7b7142afb19..e79cd29c719 100644 --- a/compiler/visualizer/render-psi/src/org/jetbrains/kotlin/compiler/visualizer/PsiVisualizer.kt +++ b/compiler/visualizer/render-psi/src/org/jetbrains/kotlin/compiler/visualizer/PsiVisualizer.kt @@ -143,7 +143,7 @@ class PsiVisualizer(private val file: KtFile, analysisResult: AnalysisResult) : return null } - val descriptor = resolvedCall.resultingDescriptor + val descriptor = resolvedCall.candidateDescriptor val typeArguments = resolvedCall.typeArguments .takeIf { it.isNotEmpty() } ?.values?.joinToString(", ", "<", ">") { renderType(it) } ?: "" diff --git a/compiler/visualizer/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.kt b/compiler/visualizer/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.kt index c0be54fe85c..c5fdda0b6f0 100644 --- a/compiler/visualizer/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.kt +++ b/compiler/visualizer/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.kt @@ -19,11 +19,11 @@ fun test_2() { // │ │ kotlin.contracts.contract { // this@0 -// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace +// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace // │ callsInPlace() // this@0 -// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace +// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace // │ callsInPlace() } @@ -55,11 +55,11 @@ var test_3: Int = 1 // │ │ kotlin.contracts.contract { // this@0 -// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace +// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace // │ callsInPlace() // this@0 -// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace +// fun (contracts/ContractBuilder).callsInPlace(Function, contracts/InvocationKind = ...): contracts/CallsInPlace // │ callsInPlace() } diff --git a/compiler/visualizer/testData/rawBuilder/declarations/delegates.kt b/compiler/visualizer/testData/rawBuilder/declarations/delegates.kt index 220b0f54a82..9472f19c4ee 100644 --- a/compiler/visualizer/testData/rawBuilder/declarations/delegates.kt +++ b/compiler/visualizer/testData/rawBuilder/declarations/delegates.kt @@ -1,7 +1,7 @@ import kotlin.properties.ReadWriteProperty import kotlin.reflect.KProperty -// fun lazy(() -> Int): Lazy +// fun lazy(() -> T): Lazy // │ Int // │ │ fun (Int).plus(Int): Int // Int │ │ │ Int diff --git a/compiler/visualizer/testData/rawBuilder/expressions/classReference.kt b/compiler/visualizer/testData/rawBuilder/expressions/classReference.kt index 59253717f19..323de1891c6 100644 --- a/compiler/visualizer/testData/rawBuilder/expressions/classReference.kt +++ b/compiler/visualizer/testData/rawBuilder/expressions/classReference.kt @@ -13,14 +13,14 @@ fun test() { // │ A()::class -// class A val reflect/KClass.java: java/lang/Class +// class A val reflect/KClass.java: java/lang/Class // │ │ A::class.java -// val reflect/KClass.java: java/lang/Class +// val reflect/KClass.java: java/lang/Class // │ test.A::class.java // constructor A() -// │ val reflect/KClass.java: java/lang/Class +// │ val reflect/KClass.java: java/lang/Class // │ │ A()::class.java } diff --git a/compiler/visualizer/testData/rawBuilder/expressions/genericCalls.kt b/compiler/visualizer/testData/rawBuilder/expressions/genericCalls.kt index 8d61c681d65..f0886fccdcb 100644 --- a/compiler/visualizer/testData/rawBuilder/expressions/genericCalls.kt +++ b/compiler/visualizer/testData/rawBuilder/expressions/genericCalls.kt @@ -6,15 +6,15 @@ fun nullableValue(): T? = null fun test() { // Int? -// │ fun nullableValue(): Int? +// │ fun nullableValue(): T? // │ │ val n = nullableValue() // Double? -// │ fun nullableValue(): Double? +// │ fun nullableValue(): T? // │ │ val x = nullableValue() // String? -// │ fun nullableValue(): String? +// │ fun nullableValue(): T? // │ │ val s = nullableValue() } diff --git a/compiler/visualizer/testData/rawBuilder/expressions/lambda.kt b/compiler/visualizer/testData/rawBuilder/expressions/lambda.kt index 11ec00de3ff..fca7aafecf8 100644 --- a/compiler/visualizer/testData/rawBuilder/expressions/lambda.kt +++ b/compiler/visualizer/testData/rawBuilder/expressions/lambda.kt @@ -74,15 +74,15 @@ fun bar(): Int { // │ fun test(list: List) { // collections/MutableMap -// │ fun collections/mutableMapOf(): collections/MutableMap +// │ fun collections/mutableMapOf(): collections/MutableMap // │ │ val map = mutableMapOf() // test.list: collections/List -// │ fun collections/Iterable.forEach((Int) -> Unit): Unit +// │ fun collections/Iterable.forEach((T) -> Unit): Unit // │ │ val test.map: collections/MutableMap -// │ │ │ fun collections/MutableMap.getOrPut(Int, () -> String): String +// │ │ │ fun collections/MutableMap.getOrPut(K, () -> V): V // │ │ │ │ test..it: Int -// │ │ │ │ │ fun collections/mutableListOf(): collections/MutableList +// │ │ │ │ │ fun collections/mutableListOf(): collections/MutableList // │ │ │ │ │ │ fun (String).plus(Any?): String // │ │ │ │ │ │ │ list.forEach { map.getOrPut(it, { mutableListOf() }) += "" } diff --git a/compiler/visualizer/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt b/compiler/visualizer/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt index ad9d6e009bc..10ab80d27af 100644 --- a/compiler/visualizer/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt +++ b/compiler/visualizer/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt @@ -4,16 +4,16 @@ fun run(block: () -> T): T = block() fun test_1() { -// fun run(() -> Unit): Unit +// fun run(() -> T): T // │ run { return@run } -// fun run(() -> ???): ??? +// fun run(() -> T): T // │ run { return } } fun test_2() { -// fun run(() -> Int): Int +// fun run(() -> T): T // │ Int // │ │ run(fun (): Int { return 1 }) diff --git a/compiler/visualizer/testData/rawBuilder/expressions/modifications.kt b/compiler/visualizer/testData/rawBuilder/expressions/modifications.kt index 54c326df980..215e4f8f64d 100644 --- a/compiler/visualizer/testData/rawBuilder/expressions/modifications.kt +++ b/compiler/visualizer/testData/rawBuilder/expressions/modifications.kt @@ -29,17 +29,17 @@ fun simple() { // collections/List // │ fun List.modify() { -// fun collections/Collection.plus(String): collections/List +// fun collections/Collection.plus(T): collections/List // │ this += "Alpha" -// fun collections/Collection.plus(String): collections/List +// fun collections/Collection.plus(T): collections/List // │ this += "Omega" } fun Any.modify() { // collections/List -// │ fun collections/Collection.plus(Int): collections/List +// │ fun collections/Collection.plus(T): collections/List // │ │ Int // │ │ │ (this as List) += 42 diff --git a/compiler/visualizer/testData/rawBuilder/expressions/these.kt b/compiler/visualizer/testData/rawBuilder/expressions/these.kt index 874189363a9..83e2386f8e2 100644 --- a/compiler/visualizer/testData/rawBuilder/expressions/these.kt +++ b/compiler/visualizer/testData/rawBuilder/expressions/these.kt @@ -30,7 +30,7 @@ class Some { fun Some.extension() = this.bar() fun test(some: Some): Int { -// fun with(Some, Some.() -> Int): Int +// fun with(T, T.() -> R): R // │ test.some: Some // │ │ with@0 // │ │ │ diff --git a/compiler/visualizer/testData/uncommonCases/resultFiles/innerWith.kt b/compiler/visualizer/testData/uncommonCases/resultFiles/innerWith.kt index 0a2f5d848ad..508d664cd56 100644 --- a/compiler/visualizer/testData/uncommonCases/resultFiles/innerWith.kt +++ b/compiler/visualizer/testData/uncommonCases/resultFiles/innerWith.kt @@ -14,7 +14,7 @@ class B { } fun foo(a: Int, b: Int): Int { -// fun with(A, A.() -> Int): Int +// fun with(T, T.() -> R): R // │ constructor A() // │ │ with@0 // │ │ │ @@ -24,7 +24,7 @@ fun foo(a: Int, b: Int): Int { // │ aProp -// fun with(B, B.() -> Int): Int +// fun with(T, T.() -> R): R // │ constructor B() // │ │ with@1 // │ │ │ @@ -44,7 +44,7 @@ fun foo(a: Int, b: Int): Int { } } -// fun with(A, A.() -> Int): Int +// fun with(T, T.() -> R): R // │ constructor A() // │ │ with@0 // │ │ │ @@ -54,7 +54,7 @@ fun foo(a: Int, b: Int): Int { // │ aProp -// fun with(B, B.() -> Int): Int +// fun with(T, T.() -> R): R // │ constructor B() // │ │ with@1 // │ │ │ @@ -69,7 +69,7 @@ fun foo(a: Int, b: Int): Int { bProp } -// fun with(B, B.() -> Int): Int +// fun with(T, T.() -> R): R // │ constructor B() // │ │ with@1 // │ │ │ diff --git a/compiler/visualizer/testData/uncommonCases/resultFiles/lists.kt b/compiler/visualizer/testData/uncommonCases/resultFiles/lists.kt index ce9f321ae3c..57287829d71 100644 --- a/compiler/visualizer/testData/uncommonCases/resultFiles/lists.kt +++ b/compiler/visualizer/testData/uncommonCases/resultFiles/lists.kt @@ -2,7 +2,7 @@ package org.jetbrains.kotlin.test // collections/List -// │ fun collections/listOf(vararg Int): collections/List +// │ fun collections/listOf(vararg T): collections/List // │ │ Int // │ │ │ Int // │ │ │ │ Int diff --git a/compiler/visualizer/testData/uncommonCases/resultFiles/superTypes.kt b/compiler/visualizer/testData/uncommonCases/resultFiles/superTypes.kt index 18d123b33b0..35cb50d5fc9 100644 --- a/compiler/visualizer/testData/uncommonCases/resultFiles/superTypes.kt +++ b/compiler/visualizer/testData/uncommonCases/resultFiles/superTypes.kt @@ -5,7 +5,7 @@ abstract class Base(var x: T) { fun replace(newValue: T) } -// constructor Base(Int) +// constructor Base(T) // │ Derived..x: Int // │ │ class Derived(var x: Int): Base(x) { diff --git a/compiler/visualizer/testData/uncommonCases/resultFiles/where.kt b/compiler/visualizer/testData/uncommonCases/resultFiles/where.kt index a965877ea02..2426a53e8b7 100644 --- a/compiler/visualizer/testData/uncommonCases/resultFiles/where.kt +++ b/compiler/visualizer/testData/uncommonCases/resultFiles/where.kt @@ -9,7 +9,7 @@ fun copyWhenGreater(list: List, threshold: T): List // │ │ copyWhenGreater..it: T // │ │ │ fun (Comparable).compareTo(T): Int // │ │ │ │ copyWhenGreater.threshold: T -// │ │ │ │ │ fun collections/Iterable.map((T) -> String): collections/List +// │ │ │ │ │ fun collections/Iterable.map((T) -> R): collections/List // │ │ │ │ │ │ copyWhenGreater..it: T // │ │ │ │ │ │ │ fun (Any).toString(): String // │ │ │ │ │ │ │ │ @@ -18,11 +18,11 @@ fun copyWhenGreater(list: List, threshold: T): List fun main() { // collections/List -// │ fun collections/listOf(vararg String): collections/List +// │ fun collections/listOf(vararg T): collections/List // │ │ val list = listOf("1", "2", "3") // collections/List -// │ fun copyWhenGreater(collections/List, String): collections/List where T : Comparable +// │ fun copyWhenGreater(collections/List, T): collections/List where T : Comparable // │ │ val main.list: collections/List // │ │ │ val copy = copyWhenGreater(list, "2")