Analysis API: pretty print declarations additionaly to debug rendering in some tests

This commit is contained in:
Ilya Kirillov
2021-11-30 13:16:46 +01:00
parent bad91915a6
commit 6e4c87f138
81 changed files with 918 additions and 23 deletions
@@ -0,0 +1 @@
interface Lazy<out T>
@@ -0,0 +1 @@
class String : java.io.Serializable, kotlin.Comparable<kotlin.Stringkotlin.String?!>, kotlin.CharSequence
@@ -0,0 +1 @@
class String : kotlin.Any, java.io.Serializable, kotlin.Comparable<kotlin.String!>, kotlin.CharSequence
@@ -0,0 +1 @@
SYNCHRONIZED
@@ -0,0 +1,6 @@
fun <T> listOf(element: T): kotlin.collections.List<T>
@kotlin.internal.InlineOnly
inline fun <T> listOf(): kotlin.collections.List<T>
fun <T> listOf(vararg elements: T): kotlin.collections.List<T>
@@ -0,0 +1 @@
interface Iterator<out T>
@@ -0,0 +1 @@
enum class FileWalkDirection
@@ -0,0 +1 @@
operator fun get(index: kotlin.Int): E
@@ -0,0 +1,3 @@
fun listIterator(): kotlin.collections.ListIterator<E>
fun listIterator(index: kotlin.Int): kotlin.collections.ListIterator<E>
@@ -0,0 +1 @@
interface MutableEntry<K, V> : kotlin.collections.Map.Entry<K, V>
@@ -0,0 +1,13 @@
annotation class Anno {
constructor(param1: kotlin.String, param2: kotlin.Int)
val param1: kotlin.String
val param2: kotlin.Int
}
@Anno(param1 = "param", param2 = 2)
class X {
@Anno(param1 = "funparam", param2 = 3)
fun x()
}
@@ -0,0 +1,3 @@
class AnonymousContainer {
val anonymousObject: java.lang.Runnable
}
@@ -0,0 +1 @@
var p: kotlin.Int
@@ -0,0 +1 @@
class A
@@ -0,0 +1,3 @@
class A {
val i: kotlin.Int
}
@@ -0,0 +1,5 @@
class A {
val a: kotlin.Int
fun x(): kotlin.Int
}
@@ -0,0 +1 @@
class A
@@ -0,0 +1,5 @@
class A {
constructor(x: kotlin.Int)
constructor(y: kotlin.Int, z: kotlin.String)
}
@@ -0,0 +1 @@
class A<T, R>
@@ -0,0 +1,17 @@
class MyColor {
constructor(x: kotlin.Int, y: kotlin.Int, z: kotlin.Int)
val x: kotlin.Int
val y: kotlin.Int
val z: kotlin.Int
}
class Some {
val delegate: MyColor
val lambda: kotlin.Lazy<MyColor>
val nonLazy: MyColor
}
@@ -0,0 +1,39 @@
@kotlin.Deprecated(message = "don't use i")
val i: kotlin.Int
val i2: kotlin.Int
@kotlin.Deprecated(message = "don't use getter of i2")
get()
var i3: kotlin.Int
get()
@kotlin.Deprecated(message = "don't use getter of i3")
set(value: kotlin.Int)
var i4: kotlin.Int
@kotlin.Deprecated(message = "don't use getter of i4")
get()
@kotlin.Deprecated(message = "don't use setter of i4")
set(value: kotlin.Int)
@kotlin.Deprecated(message = "don't use f")
fun f(): kotlin.Int
@kotlin.Deprecated(level = kotlin.DeprecationLevel.ERROR, message = "don't use j")
val j: kotlin.Int
@kotlin.Deprecated(level = kotlin.DeprecationLevel.HIDDEN, message = "don't use j2")
val j2: kotlin.Int
val j2: kotlin.Int
@kotlin.Deprecated(message = "don't use MyClass")
class MyClass
class Foo {
@kotlin.Deprecated(message = "don't use i2")
val i2: kotlin.Int
@kotlin.Deprecated(message = "don't use f2")
fun f2(): kotlin.Int
}
@@ -123,7 +123,7 @@ KtKotlinPropertySymbol:
getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i4)
javaGetterName: getI4
javaSetterName: setI4
setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i4)
setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use setter of i4)
KtFunctionSymbol:
annotationsList: [
@@ -10,7 +10,7 @@ val i2: Int = 1
var i3: Int = 1
@get:Deprecated("don't use getter of i4")
@set:Deprecated("don't use getter of i4")
@set:Deprecated("don't use setter of i4")
var i4: Int = 1
@Deprecated("don't use f")
@@ -0,0 +1,39 @@
@kotlin.Deprecated(message = "don't use i")
val i: kotlin.Int
val i2: kotlin.Int
@kotlin.Deprecated(message = "don't use getter of i2")
get()
var i3: kotlin.Int
@kotlin.Deprecated(message = "don't use getter of i3")
set(value: kotlin.Int)
var i4: kotlin.Int
@kotlin.Deprecated(message = "don't use getter of i4")
get()
@kotlin.Deprecated(message = "don't use setter of i4")
set(value: kotlin.Int)
@kotlin.Deprecated(message = "don't use f")
fun f(): kotlin.Int
@kotlin.Deprecated(level = kotlin.DeprecationLevel.ERROR, message = "don't use j")
val j: kotlin.Int
@kotlin.Deprecated(level = kotlin.DeprecationLevel.HIDDEN, message = "don't use j2")
val j2: kotlin.Int
@java.lang.Deprecated
val j2: kotlin.Int
@kotlin.Deprecated(message = "don't use MyClass")
class MyClass
class Foo {
@kotlin.Deprecated(message = "don't use i2")
val i2: kotlin.Int
@kotlin.Deprecated(message = "don't use f2")
fun f2(): kotlin.Int
}
@@ -123,7 +123,7 @@ KtKotlinPropertySymbol:
getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i4)
javaGetterName: getI4
javaSetterName: setI4
setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i4)
setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use setter of i4)
KtFunctionSymbol:
annotationsList: [
@@ -358,4 +358,4 @@ KtKotlinPropertySymbol:
getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=false, message=null)
javaGetterName: getJ2
javaSetterName: null
setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=false, message=null)
setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=false, message=null)
@@ -0,0 +1,4 @@
enum class X {
Y,
Z
}
@@ -0,0 +1,9 @@
enum class Style {
SHEET;
constructor(value: kotlin.String)
abstract val exitAnimation: kotlin.String
val value: kotlin.String
}
@@ -0,0 +1,9 @@
enum class Style {
SHEET;
constructor(value: kotlin.String)
val value: kotlin.String
abstract val exitAnimation: kotlin.String
}
@@ -0,0 +1 @@
fun kotlin.String.foo(): kotlin.Int
@@ -0,0 +1 @@
fun usage()
@@ -0,0 +1 @@
fun foo(x: kotlin.Int)
@@ -0,0 +1 @@
fun <X> foo(x: X)
@@ -0,0 +1,3 @@
class A {
constructor(i: kotlin.Int)
}
@@ -0,0 +1 @@
fun foo(): kotlin.Int
@@ -0,0 +1,3 @@
fun foo()
private inline fun bar(lmbd: (kotlin.Int) -> kotlin.Int)
@@ -0,0 +1,13 @@
class Foo {
var i: kotlin.Int
@kotlin.jvm.JvmName(name = "getMyI")
get()
@kotlin.jvm.JvmName(name = "setMyI")
set(value: kotlin.Int)
var j: kotlin.Int
@kotlin.jvm.JvmName(name = "getMyJ")
get()
@kotlin.jvm.JvmName(name = "setMyJ")
set(value: kotlin.Int)
}
@@ -0,0 +1 @@
fun yyy()
@@ -0,0 +1,5 @@
class A {
fun x(): kotlin.Int
fun y()
}
@@ -0,0 +1,5 @@
class A {
val x: kotlin.Int
val kotlin.Int.y: kotlin.Int
}
@@ -0,0 +1,7 @@
class X<T> {
inner class Y<T1>
class Z<T2>
fun <T3> foo()
}
@@ -0,0 +1,3 @@
fun x(): kotlin.Int
fun y()
@@ -0,0 +1,3 @@
val x: kotlin.Int
val kotlin.Int.y: kotlin.Int
@@ -0,0 +1,3 @@
class X<T>
private typealias Y<Z> = X<Z>
@@ -0,0 +1,19 @@
@kotlin.annotation.Target(allowedTargets = [kotlin.annotation.AnnotationTarget.TYPE])
annotation class Anno1
@kotlin.annotation.Target(allowedTargets = [kotlin.annotation.AnnotationTarget.TYPE])
annotation class Anno2
@kotlin.annotation.Target(allowedTargets = [kotlin.annotation.AnnotationTarget.TYPE])
annotation class Anno3
@kotlin.annotation.Target(allowedTargets = [kotlin.annotation.AnnotationTarget.TYPE])
annotation class Anno4
interface I
class X : @Anno1 I {
fun f(arg: @Anno2 I): @Anno3 I
val x: @Anno4 I
}
@@ -0,0 +1,7 @@
fun primitive(vararg a: kotlin.Int)
fun nullablePrimitive(vararg b: kotlin.Float?)
fun nonPrimitive(vararg c: kotlin.Any)
fun error(vararg d: ERROR_TYPE)
@@ -0,0 +1,7 @@
fun primitive(vararg a: kotlin.Int)
fun nullablePrimitive(vararg b: kotlin.Float?)
fun nonPrimitive(vararg c: kotlin.Any)
fun error(vararg d: Unresolved)
@@ -0,0 +1 @@
field
@@ -0,0 +1 @@
constructor(p0: kotlin.collections.MutableCollection<out EE?!>kotlin.collections.Collection<EE?!>?!)
@@ -0,0 +1 @@
constructor(p0: kotlin.collections.(Mutable)Collection<out E!>!)
@@ -0,0 +1 @@
fun withOuter(): Outer?
@@ -0,0 +1 @@
fun withOuter(): Outer?
@@ -0,0 +1 @@
fun Runnable(function: () -> kotlin.Unit): java.lang.Runnable