[Analysis API] update testdata after renderer rework

The new testdata seems to be more correct or just different

^KTIJ-23268
This commit is contained in:
Ilya Kirillov
2022-10-28 10:36:50 +02:00
parent d1eb7c51f1
commit 26ec7ec296
123 changed files with 346 additions and 356 deletions
@@ -1,2 +1,2 @@
expression: arr[0]
type: ERROR_TYPE <Unresolved name: set>
type: ERROR_TYPE(Unresolved name: set)
@@ -1,2 +1,2 @@
expression: a
type: (A&B)
type: A & B
@@ -1,2 +1,2 @@
expression: super
type: (A&B)
type: A & B
@@ -1,2 +1,2 @@
KtType: ERROR_TYPE
KtType: ERROR
PsiType: null
@@ -0,0 +1,2 @@
KtType: kotlin.Int
PsiType: PsiType:int
@@ -1,2 +1,2 @@
KtType: Outer.<no name provided>.Inner
KtType: Outer.`<no name provided>`.Inner
PsiType: null
@@ -1,2 +1,2 @@
KtType: T!!
KtType: T & kotlin.Any
PsiType: PsiType:T
@@ -1,6 +1,8 @@
KtDeclaration: KtProperty
Symbol:
var foo: kotlin.Int
get()
set(value: kotlin.Int)
Signature:
KtVariableLikeSignature:
@@ -1,3 +1,3 @@
expression: a
isStable: true
smartCastType: (A&B)
smartCastType: A & B
@@ -1,3 +0,0 @@
expression: a
isStable: false
smartCastType: (A & B)
@@ -1,3 +1,3 @@
expression: a
isStable: false
smartCastType: (A&B)
smartCastType: A & B
@@ -1,3 +1,3 @@
expression: a
isStable: true
smartCastType: (A&B)
smartCastType: A & B
@@ -1,3 +1,3 @@
expression: a
isStable: false
smartCastType: (A&B)
smartCastType: A & B
@@ -1,4 +1,4 @@
open class A
class B : A
class B : A()
@@ -0,0 +1,10 @@
abstract class A {
abstract class Nested
}
typealias TA = A
class B : A() {
class NestedInB : A.Nested()
}
@@ -4,7 +4,7 @@ abstract class A {
typealias TA = A
class B : TA {
class NestedInB : A.Nested
class B : TA() {
class NestedInB : A.Nested()
}
@@ -1,10 +1,10 @@
abstract class My {
abstract class NestedOne : My {
abstract class NestedTwo : My.NestedOne
abstract class NestedOne : My() {
abstract class NestedTwo : My.NestedOne()
}
}
class Your : My {
class NestedThree : My.NestedOne
class Your : My() {
class NestedThree : My.NestedOne()
}
@@ -5,9 +5,7 @@ annotation class base
annotation class derived
@base
class correct {
constructor(x: Int)
class correct(x: Int) {
@base
constructor()
@@ -17,8 +15,8 @@ class correct {
@base
enum class My {
FIRST,
SECOND
@base FIRST,
@base SECOND
}
@base
@@ -5,9 +5,7 @@ annotation class base
annotation class derived
@base
class correct {
constructor(@base x: Int)
class correct(@base x: Int) {
@base
constructor()
@@ -17,8 +15,8 @@ class correct {
@base
enum class My {
FIRST,
SECOND
@base FIRST,
@base SECOND
}
@base
@@ -1,16 +0,0 @@
object A {
constructor()
}
enum class B {
X
}
class C {
companion object {
constructor()
}
}
val anonObject: Any
@@ -0,0 +1,14 @@
interface MyRwProperty<in T, V> {
operator fun getValue(thisRef: T, property: Any): V
operator fun setValue(thisRef: T, property: Any, value: V)
}
val x: Int
val delegate: MyRwProperty<Any?, Int>
val value: Int
var variable: Int
@@ -5,10 +5,14 @@ interface MyRwProperty<in T, V> {
}
val x: Int
get()
val delegate: MyRwProperty<Any?, Int>
val value: Int
get()
var variable: Int
get()
set(variable: Int)
@@ -1,12 +1,8 @@
open class Base<T> {
constructor(x: T)
open class Base<T>(x: T) {
val x: T
}
class Derived<T : Any> : Base<T> {
constructor(x: T)
}
class Derived<T : Any>(x: T) : Base<T>()
fun <T : Any> create(x: T): Derived<T>
@@ -4,27 +4,31 @@ enum class Order {
THIRD
}
enum class Planet {
EARTH,
MERCURY,
VENERA;
constructor(m: Double, r: Double)
val g: Double
val m: Double
internal val r: Double
enum class Planet(m: Double, r: Double) {
EARTH {
override fun sayHello()
},
MERCURY {
override fun sayHello()
},
VENERA {
override fun sayHello()
};
abstract fun sayHello()
companion object {
const val G: Double
}
internal val r: Double
val g: Double
val m: Double
}
enum class PseudoInsn {
enum class PseudoInsn(signature: String) {
AS_NOT_NULL,
FAKE_ALWAYS_FALSE_IFEQ,
FAKE_ALWAYS_TRUE_IFEQ,
@@ -33,10 +37,8 @@ enum class PseudoInsn {
SAVE_STACK_BEFORE_TRY,
STORE_NOT_NULL;
constructor(signature: String = ...)
fun emit()
val signature: String
fun emit()
}
@@ -4,14 +4,16 @@ object O1 : Some
object O2 : Some
enum class SomeEnum {
FIRST,
SECOND;
constructor(x: Some)
val x: Some
enum class SomeEnum(x: Some) {
FIRST {
override fun check(y: Some): Boolean
},
SECOND {
override fun check(y: Some): Boolean
};
abstract fun check(y: Some): Boolean
val x: Some
}
@@ -1,4 +1,5 @@
fun <T> genericFoo(): T
val <T> T.generic: T
get()
@@ -1,14 +1,10 @@
abstract class Base {
constructor(s: String)
abstract class Base(s: String) {
val s: String
}
class Outer {
class Derived : Base {
constructor(s: String)
}
class Derived(s: String) : Base()
object Obj : Base
object Obj : Base()
}
@@ -1,17 +1,19 @@
interface SomeInterface {
val bar: Boolean
fun foo(x: Int, y: String): String
val bar: Boolean
}
class SomeClass : SomeInterface {
override var bar: Boolean
private val baz: Int
lateinit var fau: Double
override fun foo(x: Int, y: String): String
override var bar: Boolean
get()
set(value: Boolean)
private val baz: Int
}
inline class InlineClass
@@ -0,0 +1,6 @@
interface B
typealias C = B
class D : B
@@ -0,0 +1,8 @@
open class A
interface B<S, T : A>
typealias C<T> = B<T, A>
class D : B<A, A>
@@ -1,16 +1,16 @@
interface Some
abstract class My<T : Some> {
abstract class Some : My<Some>.T()
abstract fun foo(arg: T)
abstract val x: T
abstract val y: My<Some>.T
abstract val z: My<Some>.T
abstract fun foo(arg: T)
abstract class Some : My<Some>.T
open inner class T
}
@@ -10,7 +10,7 @@ typealias AnyList = List<*>
abstract class AbstractList<out T : Any> : List<T>
class SomeList : AbstractList<Int> {
class SomeList : AbstractList<Int>() {
override infix fun concat(other: List<Int>): List<Int>
override operator fun get(index: Int): Int
@@ -2,9 +2,7 @@
annotation class A1
@Target(allowedTargets = [kotlin.annotation.AnnotationTarget.TYPE])
annotation class A2 {
constructor(value: String)
annotation class A2(value: String) {
val value: String
}
@@ -1,7 +1,5 @@
@Target(allowedTargets = [kotlin.annotation.AnnotationTarget.TYPE])
annotation class A {
constructor(value: Int)
annotation class A(value: Int) {
val value: Int
}
@@ -2,5 +2,5 @@ interface A
interface B
class C<T : A> where T : B
class C<T> where T : A, T : B
@@ -1,7 +0,0 @@
fun test() {
class A
@Denotable("A") A()
@Denotable("kotlin.collections.List<A>") listOf(A())
@Nondenotable("`<no name provided>`") object {}
@Nondenotable("kotlin.collections.List<`<no name provided>`>") listOf(object {})
}
@@ -2,6 +2,6 @@ fun test() {
class A
@Denotable("A") A()
@Denotable("kotlin.collections.List<A>") listOf(A())
@Nondenotable("<anonymous>") object {}
@Nondenotable("kotlin.collections.List<<anonymous>>") listOf(object {})
@Nondenotable("`<anonymous>`") object {}
@Nondenotable("kotlin.collections.List<`<anonymous>`>") listOf(object {})
}
@@ -18,7 +18,7 @@ fun test(a: Any?) {
(@Denotable("kotlin.Any?") a).length
(@Denotable("kotlin.Any?") a).inc()
}
@Nondenotable("(kotlin.Comparable<*> & java.io.Serializable)") if (true) {
@Nondenotable("kotlin.Comparable<*> & java.io.Serializable") if (true) {
""
} else {
1
@@ -2,7 +2,7 @@ fun test(a: Any?) {
if (a is String) {
(@Denotable("kotlin.String") a).length
if (a is Int) {
(@Nondenotable("(kotlin.String&kotlin.Int)") a).inc()
(@Nondenotable("kotlin.String & kotlin.Int") a).inc()
}
if (a is String) {
(@Denotable("kotlin.String") a).length
@@ -15,10 +15,10 @@ fun test(a: Any?) {
(@Denotable("kotlin.Nothing?") a).isNothing()
}
if (a is String || a is Int) {
(@Nondenotable("(kotlin.Comparable<(kotlin.String&kotlin.Int)>&java.io.Serializable)") a).length
(@Nondenotable("(kotlin.Comparable<(kotlin.String&kotlin.Int)>&java.io.Serializable)") a).inc()
(@Nondenotable("kotlin.Comparable<kotlin.String & kotlin.Int> & java.io.Serializable") a).length
(@Nondenotable("kotlin.Comparable<kotlin.String & kotlin.Int> & java.io.Serializable") a).inc()
}
@Nondenotable("(kotlin.Comparable<*>&java.io.Serializable)") if (true) {
@Nondenotable("kotlin.Comparable<*> & java.io.Serializable") if (true) {
""
} else {
1
@@ -3,7 +3,7 @@ interface A
fun <T> test(t: T) {
@Denotable("T") t
if (t != null) {
(@Nondenotable("T & Any") t).equals("")
(@Nondenotable("T & kotlin.Any") t).equals("")
}
val outs = take(getOutProjection())
@Denotable("A") outs
@@ -3,7 +3,7 @@ interface A
fun <T> test(t: T) {
@Denotable("T") t
if (t != null) {
(@Denotable("T!!") t).equals("")
(@Denotable("T & kotlin.Any") t).equals("")
}
val outs = take(getOutProjection())
@Denotable("A") outs
@@ -1,17 +1,17 @@
[direct super types]
kotlin.collections.List<CapturedType(in kotlin/String)>
kotlin.collections.MutableCollection<CapturedType(in kotlin/String)>
kotlin.collections.List<CapturedType(in kotlin.String)>
kotlin.collections.MutableCollection<CapturedType(in kotlin.String)>
[approximated direct super types]
kotlin.collections.List<kotlin.Any?>
kotlin.collections.MutableCollection<in kotlin.String>
[all super types]
kotlin.collections.List<CapturedType(in kotlin/String)>
kotlin.collections.MutableCollection<CapturedType(in kotlin/String)>
kotlin.collections.Collection<CapturedType(in kotlin/String)>
kotlin.collections.MutableIterable<CapturedType(in kotlin/String)>
kotlin.collections.Iterable<CapturedType(in kotlin/String)>
kotlin.collections.List<CapturedType(in kotlin.String)>
kotlin.collections.MutableCollection<CapturedType(in kotlin.String)>
kotlin.collections.Collection<CapturedType(in kotlin.String)>
kotlin.collections.MutableIterable<CapturedType(in kotlin.String)>
kotlin.collections.Iterable<CapturedType(in kotlin.String)>
kotlin.Any
[approximated all super types]
@@ -21,3 +21,4 @@ kotlin.collections.Collection<kotlin.Any?>
kotlin.collections.MutableIterable<kotlin.Any?>
kotlin.collections.Iterable<kotlin.Any?>
kotlin.Any
@@ -1,17 +1,17 @@
[direct super types]
kotlin.collections.List<CapturedType(out kotlin/String)>
kotlin.collections.MutableCollection<CapturedType(out kotlin/String)>
kotlin.collections.List<CapturedType(out kotlin.String)>
kotlin.collections.MutableCollection<CapturedType(out kotlin.String)>
[approximated direct super types]
kotlin.collections.List<kotlin.String>
kotlin.collections.MutableCollection<out kotlin.String>
[all super types]
kotlin.collections.List<CapturedType(out kotlin/String)>
kotlin.collections.MutableCollection<CapturedType(out kotlin/String)>
kotlin.collections.Collection<CapturedType(out kotlin/String)>
kotlin.collections.MutableIterable<CapturedType(out kotlin/String)>
kotlin.collections.Iterable<CapturedType(out kotlin/String)>
kotlin.collections.List<CapturedType(out kotlin.String)>
kotlin.collections.MutableCollection<CapturedType(out kotlin.String)>
kotlin.collections.Collection<CapturedType(out kotlin.String)>
kotlin.collections.MutableIterable<CapturedType(out kotlin.String)>
kotlin.collections.Iterable<CapturedType(out kotlin.String)>
kotlin.Any
[approximated all super types]
@@ -21,3 +21,4 @@ kotlin.collections.Collection<kotlin.String>
kotlin.collections.MutableIterable<kotlin.String>
kotlin.collections.Iterable<kotlin.String>
kotlin.Any