[VISUALIZER] Disable rendering of value arguments in psi part

For now instead of arguments will be rendered parameters
This commit is contained in:
Ivan Kylchik
2021-02-10 16:12:47 +03:00
committed by TeamCityServer
parent f2cf86a3ae
commit ce844a9bba
13 changed files with 33 additions and 33 deletions
@@ -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) } ?: ""
@@ -19,11 +19,11 @@ fun test_2() {
// │ │
kotlin.contracts.contract {
// this@0
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<???>, contracts/InvocationKind = ...): contracts/CallsInPlace
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<R>, contracts/InvocationKind = ...): contracts/CallsInPlace
// │
callsInPlace()
// this@0
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<???>, contracts/InvocationKind = ...): contracts/CallsInPlace
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<R>, contracts/InvocationKind = ...): contracts/CallsInPlace
// │
callsInPlace()
}
@@ -55,11 +55,11 @@ var test_3: Int = 1
// │ │
kotlin.contracts.contract {
// this@0
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<???>, contracts/InvocationKind = ...): contracts/CallsInPlace
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<R>, contracts/InvocationKind = ...): contracts/CallsInPlace
// │
callsInPlace()
// this@0
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<???>, contracts/InvocationKind = ...): contracts/CallsInPlace
// fun <R> (contracts/ContractBuilder).callsInPlace<???>(Function<R>, contracts/InvocationKind = ...): contracts/CallsInPlace
// │
callsInPlace()
}
@@ -1,7 +1,7 @@
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
// fun <T> lazy<Int>(() -> Int): Lazy<Int>
// fun <T> lazy<Int>(() -> T): Lazy<T>
// │ Int
// │ │ fun (Int).plus(Int): Int
// Int │ │ │ Int
@@ -13,14 +13,14 @@ fun test() {
// │
A()::class
// class A val <T> reflect/KClass<A>.java: java/lang/Class<A>
// class A val <T> reflect/KClass<T>.java: java/lang/Class<T>
// │ │
A::class.java
// val <T> reflect/KClass<A>.java: java/lang/Class<A>
// val <T> reflect/KClass<T>.java: java/lang/Class<T>
// │
test.A::class.java
// constructor A()
// │ val <T> reflect/KClass<out A>.java: java/lang/Class<out A>
// │ val <T> reflect/KClass<T>.java: java/lang/Class<T>
// │ │
A()::class.java
}
@@ -6,15 +6,15 @@ fun <T> nullableValue(): T? = null
fun test() {
// Int?
// │ fun <T> nullableValue<Int>(): Int?
// │ fun <T> nullableValue<Int>(): T?
// │ │
val n = nullableValue<Int>()
// Double?
// │ fun <T> nullableValue<Double>(): Double?
// │ fun <T> nullableValue<Double>(): T?
// │ │
val x = nullableValue<Double>()
// String?
// │ fun <T> nullableValue<String>(): String?
// │ fun <T> nullableValue<String>(): T?
// │ │
val s = nullableValue<String>()
}
@@ -74,15 +74,15 @@ fun bar(): Int {
// │
fun test(list: List<Int>) {
// collections/MutableMap<Int, String>
// │ fun <K, V> collections/mutableMapOf<Int, String>(): collections/MutableMap<Int, String>
// │ fun <K, V> collections/mutableMapOf<Int, String>(): collections/MutableMap<K, V>
// │ │
val map = mutableMapOf<Int, String>()
// test.list: collections/List<Int>
// │ fun <T> collections/Iterable<Int>.forEach<Int>((Int) -> Unit): Unit
// │ fun <T> collections/Iterable<T>.forEach<Int>((T) -> Unit): Unit
// │ │ val test.map: collections/MutableMap<Int, String>
// │ │ │ fun <K, V> collections/MutableMap<Int, String>.getOrPut<Int, String>(Int, () -> String): String
// │ │ │ fun <K, V> collections/MutableMap<K, V>.getOrPut<Int, String>(K, () -> V): V
// │ │ │ │ test.<anonymous>.it: Int
// │ │ │ │ │ fun <T> collections/mutableListOf<???>(): collections/MutableList<???>
// │ │ │ │ │ fun <T> collections/mutableListOf<???>(): collections/MutableList<T>
// │ │ │ │ │ │ fun (String).plus(Any?): String
// │ │ │ │ │ │ │
list.forEach { map.getOrPut(it, { mutableListOf() }) += "" }
@@ -4,16 +4,16 @@
fun <T> run(block: () -> T): T = block()
fun test_1() {
// fun <T> run<Unit>(() -> Unit): Unit
// fun <T> run<Unit>(() -> T): T
// │
run { return@run }
// fun <T> run<???>(() -> ???): ???
// fun <T> run<???>(() -> T): T
// │
run { return }
}
fun test_2() {
// fun <T> run<Int>(() -> Int): Int
// fun <T> run<Int>(() -> T): T
// │ Int
// │ │
run(fun (): Int { return 1 })
@@ -29,17 +29,17 @@ fun simple() {
// collections/List<String>
// │
fun List<String>.modify() {
// fun <T> collections/Collection<String>.plus<String>(String): collections/List<String>
// fun <T> collections/Collection<T>.plus<String>(T): collections/List<T>
// │
this += "Alpha"
// fun <T> collections/Collection<String>.plus<String>(String): collections/List<String>
// fun <T> collections/Collection<T>.plus<String>(T): collections/List<T>
// │
this += "Omega"
}
fun Any.modify() {
// collections/List<Int>
// │ fun <T> collections/Collection<Int>.plus<Int>(Int): collections/List<Int>
// │ fun <T> collections/Collection<T>.plus<Int>(T): collections/List<T>
// │ │ Int
// │ │ │
(this as List<Int>) += 42
@@ -30,7 +30,7 @@ class Some {
fun Some.extension() = this.bar()
fun test(some: Some): Int {
// fun <T, R> with<Some, Int>(Some, Some.() -> Int): Int
// fun <T, R> with<Some, Int>(T, T.() -> R): R
// │ test.some: Some
// │ │ with@0
// │ │ │
@@ -14,7 +14,7 @@ class B {
}
fun foo(a: Int, b: Int): Int {
// fun <T, R> with<A, Int>(A, A.() -> Int): Int
// fun <T, R> with<A, Int>(T, T.() -> R): R
// │ constructor A()
// │ │ with@0
// │ │ │
@@ -24,7 +24,7 @@ fun foo(a: Int, b: Int): Int {
// │
aProp
// fun <T, R> with<B, Int>(B, B.() -> Int): Int
// fun <T, R> with<B, Int>(T, T.() -> R): R
// │ constructor B()
// │ │ with@1
// │ │ │
@@ -44,7 +44,7 @@ fun foo(a: Int, b: Int): Int {
}
}
// fun <T, R> with<A, Int>(A, A.() -> Int): Int
// fun <T, R> with<A, Int>(T, T.() -> R): R
// │ constructor A()
// │ │ with@0
// │ │ │
@@ -54,7 +54,7 @@ fun foo(a: Int, b: Int): Int {
// │
aProp
// fun <T, R> with<B, Int>(B, B.() -> Int): Int
// fun <T, R> with<B, Int>(T, T.() -> R): R
// │ constructor B()
// │ │ with@1
// │ │ │
@@ -69,7 +69,7 @@ fun foo(a: Int, b: Int): Int {
bProp
}
// fun <T, R> with<B, Int>(B, B.() -> Int): Int
// fun <T, R> with<B, Int>(T, T.() -> R): R
// │ constructor B()
// │ │ with@1
// │ │ │
@@ -2,7 +2,7 @@
package org.jetbrains.kotlin.test
// collections/List<Int>
// │ fun <T> collections/listOf<Int>(vararg Int): collections/List<Int>
// │ fun <T> collections/listOf<Int>(vararg T): collections/List<T>
// │ │ Int
// │ │ │ Int
// │ │ │ │ Int
@@ -5,7 +5,7 @@ abstract class Base<T>(var x: T) {
fun replace(newValue: T)
}
// constructor Base<T>(Int)
// constructor Base<T>(T)
// │ Derived.<init>.x: Int
// │ │
class Derived(var x: Int): Base<Int>(x) {
@@ -9,7 +9,7 @@ fun <T> copyWhenGreater(list: List<T>, threshold: T): List<String>
// │ │ copyWhenGreater.<anonymous>.it: T
// │ │ │ fun (Comparable<T>).compareTo(T): Int
// │ │ │ │ copyWhenGreater.threshold: T
// │ │ │ │ │ fun <T, R> collections/Iterable<T>.map<T, String>((T) -> String): collections/List<String>
// │ │ │ │ │ fun <T, R> collections/Iterable<T>.map<T, String>((T) -> R): collections/List<R>
// │ │ │ │ │ │ copyWhenGreater.<anonymous>.it: T
// │ │ │ │ │ │ │ fun (Any).toString(): String
// │ │ │ │ │ │ │ │
@@ -18,11 +18,11 @@ fun <T> copyWhenGreater(list: List<T>, threshold: T): List<String>
fun main() {
// collections/List<String>
// │ fun <T> collections/listOf<String>(vararg String): collections/List<String>
// │ fun <T> collections/listOf<String>(vararg T): collections/List<T>
// │ │
val list = listOf("1", "2", "3")
// collections/List<String>
// │ fun <T : CharSequence> copyWhenGreater<String>(collections/List<String>, String): collections/List<String> where T : Comparable<String>
// │ fun <T : CharSequence> copyWhenGreater<String>(collections/List<T>, T): collections/List<String> where T : Comparable<T>
// │ │ val main.list: collections/List<String>
// │ │ │
val copy = copyWhenGreater(list, "2")