[VISUALIZER] Render original symbols/descriptors in fir/psi

This commit is contained in:
Ivan Kylchik
2021-03-05 15:36:49 +03:00
committed by TeamCityServer
parent 869585870d
commit e19514f1dc
22 changed files with 243 additions and 156 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ fun fooLabeled() {
// │
fun bar(list: List<String>) {
// bar.list: collections/List<String>
// │ fun (collections/List<String>).subList(Int, Int): collections/List<String>
// │ fun (collections/List<E>).subList(Int, Int): collections/List<E>
// │ │ Int
// String │ │ │ Int
// │ │ │ │ │
@@ -51,7 +51,7 @@ fun bar(list: List<String>) {
println(element)
}
// bar.list: collections/List<String>
// │ fun (collections/List<String>).subList(Int, Int): collections/List<String>
// │ fun (collections/List<E>).subList(Int, Int): collections/List<E>
// │ │ fun io/println(Any?): Unit
// String │ │ Int Int │ val bar.element: String
// │ │ │ │ │ │ │
+2 -2
View File
@@ -4,10 +4,10 @@
// │ │
fun foo(x: Int, y: Int, c: Collection<Int>) =
// foo.x: Int
// │ fun (collections/Collection<Int>).contains(Int): Boolean
// │ fun (collections/Collection<E>).contains(E): Boolean
// │ │ foo.c: collections/Collection<Int>
// │ │ │ foo.y: Int
// │ │ │ │ fun (collections/Collection<Int>).contains(Int): Boolean
// │ │ │ │ fun (collections/Collection<E>).contains(E): Boolean
// │ │ │ │ │ foo.c: collections/Collection<Int>
// │ │ │ │ │ │
x in c && y !in c
@@ -2,12 +2,12 @@
fun test(e: Int.() -> String) {
// String
// │ Int
// │ │ fun Int.invoke(): String
// │ │ fun P1.invoke(): R
// │ │ │
val s = 3.e()
// String
// │ Int
// │ │ fun Int.invoke(): String
// │ │ fun P1.invoke(): R
// │ │ │test.e: Int.() -> String
// │ │ ││
val ss = 3.(e)()
@@ -3,7 +3,7 @@
data class Tuple(val x: Int, val y: Int)
// Int
// │ fun ((Tuple) -> Int).invoke(Tuple): Int
// │ fun ((P1) -> R).invoke(P1): R
// │ │ constructor Tuple(Int, Int)
// │ │ │ Int
// │ │ │ │ Int
@@ -1,5 +1,5 @@
// FIR_IGNORE
// T fun (() -> T).invoke(): T
// T fun (() -> R).invoke(): R
// │ │
fun <T> run(block: () -> T): T = block()
@@ -1,4 +1,3 @@
// FIR_IGNORE
fun withLocals(p: Int): Int {
class Local(val pp: Int) {
// Int
@@ -17,7 +16,7 @@ fun withLocals(p: Int): Int {
fun sum(y: Int, z: Int, f: (Int, Int) -> Int): Int {
// val withLocals.x: Int
// │ fun (Int).plus(Int): Int
// │ │ fun ((Int, Int) -> Int).invoke(Int, Int): Int
// │ │ fun ((P1, P2) -> R).invoke(P1, P2): R
// │ │ │ withLocals.sum.y: Int
// │ │ │ │ withLocals.sum.z: Int
// │ │ │ │ │
@@ -41,9 +40,9 @@ fun withLocals(p: Int): Int {
// │ │ │ Int
// │ │ │ │ fun (withLocals.Local).diff(): Int
// │ │ │ │ │ Int
// │ │ │ │ │ │ withLocals.<no name provided>.x: Int
// │ │ │ │ │ │ withLocals.<anonymous>.x: Int
// │ │ │ │ │ │ │ fun (Int).plus(Int): Int
// │ │ │ │ │ │ │ │ withLocals.<no name provided>.y: Int
// │ │ │ │ │ │ │ │ withLocals.<anonymous>.y: Int
// │ │ │ │ │ │ │ │ │
return sum(code, Local(1).diff(), fun(x: Int, y: Int) = x + y)
}
@@ -1,5 +1,5 @@
fun test() {
// class Array<T>: Any, Cloneable, java/io/Serializable
// class Array<T>: java/io/Serializable, Cloneable
// │
Array<String>::class
}
+2 -2
View File
@@ -4,13 +4,13 @@ fun some() {
// constructor KotlinNullPointerException()
// │
throw KotlinNullPointerException()
// RuntimeException /* = java/lang/RuntimeException */
// java/lang/RuntimeException
// │
} catch (e: RuntimeException) {
// fun io/println(Any?): Unit
// │
println("Runtime exception")
// Exception /* = java/lang/Exception */
// java/lang/Exception
// │
} catch (e: Exception) {
// fun io/println(Any?): Unit