[VISUALIZER] Change result of psi render according to new test data

This commit is contained in:
Ivan Kylchik
2021-02-17 15:58:22 +03:00
committed by TeamCityServer
parent 3e66d12bef
commit 4259ad2d84
5 changed files with 55 additions and 32 deletions
@@ -1,9 +1,36 @@
// FIR_IGNORE // FIR_IGNORE
//constructor annotation/Target(vararg annotation/AnnotationTarget) //constructor annotation/Target(vararg annotation/AnnotationTarget)
//│ enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget> //│
//│ │ enum entry annotation/AnnotationTarget.ANNOTATION_CLASS @Target(
// │ │ // enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
@Target(AnnotationTarget.ANNOTATION_CLASS) annotation class base // │ enum entry annotation/AnnotationTarget.CLASS
// │ │
AnnotationTarget.CLASS,
// enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
// │ enum entry annotation/AnnotationTarget.PROPERTY
// │ │
AnnotationTarget.PROPERTY,
// enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
// │ enum entry annotation/AnnotationTarget.LOCAL_VARIABLE
// │ │
AnnotationTarget.LOCAL_VARIABLE,
// enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
// │ enum entry annotation/AnnotationTarget.VALUE_PARAMETER
// │ │
AnnotationTarget.VALUE_PARAMETER,
// enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
// │ enum entry annotation/AnnotationTarget.CONSTRUCTOR
// │ │
AnnotationTarget.CONSTRUCTOR,
// enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
// │ enum entry annotation/AnnotationTarget.FUNCTION
// │ │
AnnotationTarget.FUNCTION,
// enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
// │ enum entry annotation/AnnotationTarget.TYPE
// │ │
AnnotationTarget.TYPE
) annotation class base
//constructor base() //constructor base()
//│ //│
@@ -1,8 +1,7 @@
// FIR_IGNORE // FIR_IGNORE
// Unit // T fun (() -> T).invoke(): T
// │ fun ((T) -> Unit).invoke(T): Unit // │ │
// │ │ fun <T> simpleRun(f: () -> T): T = f()
fun <T> simpleRun(f: (T) -> Unit): Unit = f()
// collections/List<T> // collections/List<T>
// │ // │
@@ -2,8 +2,10 @@
//constructor annotation/Target(vararg annotation/AnnotationTarget) //constructor annotation/Target(vararg annotation/AnnotationTarget)
//│ enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget> //│ enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
//│ │ enum entry annotation/AnnotationTarget.EXPRESSION //│ │ enum entry annotation/AnnotationTarget.EXPRESSION
//│ │ │ //│ │ │ enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
@Target(AnnotationTarget.EXPRESSION) //│ │ │ │ enum entry annotation/AnnotationTarget.LOCAL_VARIABLE
//│ │ │ │ │
@Target(AnnotationTarget.EXPRESSION, AnnotationTarget.LOCAL_VARIABLE)
//constructor annotation/Retention(annotation/AnnotationRetention = ...) //constructor annotation/Retention(annotation/AnnotationRetention = ...)
//│ enum class annotation/AnnotationRetention: Enum<annotation/AnnotationRetention> //│ enum class annotation/AnnotationRetention: Enum<annotation/AnnotationRetention>
//│ │ enum entry annotation/AnnotationRetention.SOURCE //│ │ enum entry annotation/AnnotationRetention.SOURCE
@@ -40,14 +42,12 @@ fun foo(arg: Int): Int {
return 42 return 42
} }
data class Two(x: Int, y: Int) data class Two(val x: Int, val y: Int)
fun bar(two: Two) { fun bar(two: Two) {
// constructor Ann() // constructor Ann()
// │ [ERROR : component1() return type] // │ constructor Ann()
// │ │ constructor Ann() // │ Int │ Int bar.two: Two
// │ │ │ [ERROR : component2() return type]
// │ │ │ │ bar.two: Two
// │ │ │ │ │ // │ │ │ │ │
val (@Ann x, @Ann y) = two val (@Ann x, @Ann y) = two
} }
+11 -13
View File
@@ -1,25 +1,23 @@
// FIR_IGNORE // FIR_IGNORE
// WITH_RUNTIME // WITH_RUNTIME
// Int // fun (Int).plus(Int): Int
// │ distance.x: Int // Int │ distance.y: Int
// │ │ fun (Int).plus(Int): Int // │ │
// │ │ │ distance.y: Int infix fun Int.distance(y: Int) = this + y
// │ │ │ │
infix fun distance(x: Int, y: Int) = x + y
// [ERROR: unknown type] // Int
// │ Int // │ Int
// │ │ [ERROR: not resolved] // │ │ fun Int.distance(Int): Int
// │ │ │ Int // │ │ │ Int
// │ │ │ │ // │ │ │ │
fun test(): Int = 3 distance 4 fun test(): Int = 3 distance 4
// Int // Int
// │ fun distance(Int, Int): Int // │ Int
// │ │ Int // │ │ fun Int.distance(Int): Int
// │ │ Int // │ │ Int
// │ │ // │ │
fun testRegular(): Int = distance(3, 4) fun testRegular(): Int = 3.distance(4)
class My(var x: Int) { class My(var x: Int) {
// Int // Int
@@ -19,10 +19,9 @@ fun withLocals(p: Int): Int {
// │ fun (Int).plus(Int): Int // │ fun (Int).plus(Int): Int
// │ │ fun ((Int, Int) -> Int).invoke(Int, Int): Int // │ │ fun ((Int, Int) -> Int).invoke(Int, Int): Int
// │ │ │ withLocals.sum.y: Int // │ │ │ withLocals.sum.y: Int
// │ │ │ │ fun (Int).plus(Int): Int // │ │ │ │ withLocals.sum.z: Int
// │ │ │ │ │ withLocals.sum.z: Int // │ │ │ │
// │ │ │ │ │ │ return x + f(y, z)
return x + f(y + z)
} }
// Int constructor Any() // Int constructor Any()