[Tests] Use stable order for ir/kotlinLike dumps

^KT-65406
This commit is contained in:
Pavel Kunyavskiy
2024-02-05 16:23:41 +01:00
committed by Space Team
parent 0fa42a9c11
commit e6f4d6e6fa
1265 changed files with 43896 additions and 48472 deletions
@@ -1,32 +1,3 @@
interface SymbolOwner<E : SymbolOwner<E>> {
}
interface Symbol<E : SymbolOwner<E>> {
}
interface ReceiverValue {
abstract val type: String
abstract get
}
class ImplicitReceiverValue<S : Symbol<*>> : ReceiverValue {
constructor(boundSymbol: S?, type: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val boundSymbol: S?
field = boundSymbol
get
override val type: String
field = type
override get
}
abstract class ImplicitReceiverStack : Iterable<ImplicitReceiverValue<*>> {
constructor() /* primary */ {
super/*Any*/()
@@ -38,38 +9,59 @@ abstract class ImplicitReceiverStack : Iterable<ImplicitReceiverValue<*>> {
}
class ImplicitReceiverValue<S : Symbol<*>> : ReceiverValue {
val boundSymbol: S?
field = boundSymbol
get
override val type: String
field = type
override get
constructor(boundSymbol: S?, type: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class PersistentImplicitReceiverStack : ImplicitReceiverStack, Iterable<ImplicitReceiverValue<*>> {
private val stack: List<ImplicitReceiverValue<*>>
field = stack
private get
constructor(stack: List<ImplicitReceiverValue<*>>) /* primary */ {
super/*ImplicitReceiverStack*/()
/* <init>() */
}
private val stack: List<ImplicitReceiverValue<*>>
field = stack
private get
override operator fun get(name: String?): ImplicitReceiverValue<*>? {
return <this>.<get-stack>().lastOrNull<ImplicitReceiverValue<*>>()
}
override operator fun iterator(): Iterator<ImplicitReceiverValue<*>> {
return <this>.<get-stack>().iterator()
}
override operator fun get(name: String?): ImplicitReceiverValue<*>? {
return <this>.<get-stack>().lastOrNull<ImplicitReceiverValue<*>>()
}
}
interface ReceiverValue {
abstract val type: String
abstract get
}
interface Symbol<E : SymbolOwner<E>> {
}
interface SymbolOwner<E : SymbolOwner<E>> {
}
fun bar(s: String) {
}
fun foo(stack: PersistentImplicitReceiverStack) {
stack.forEach<ImplicitReceiverValue<*>>(action = local fun <anonymous>(it: ImplicitReceiverValue<*>) {
it.<get-boundSymbol>() /*~> Unit */
bar(s = it.<get-type>())
}
)
}
fun box(): String {
val stack: PersistentImplicitReceiverStack = PersistentImplicitReceiverStack(stack = listOf<ImplicitReceiverValue<Nothing>>(elements = [ImplicitReceiverValue<Nothing>(boundSymbol = null, type = "O"), ImplicitReceiverValue<Nothing>(boundSymbol = null, type = "K")]))
foo(stack = stack)
@@ -81,3 +73,12 @@ fun box(): String {
}
})
}
fun foo(stack: PersistentImplicitReceiverStack) {
stack.forEach<ImplicitReceiverValue<*>>(action = local fun <anonymous>(it: ImplicitReceiverValue<*>) {
it.<get-boundSymbol>() /*~> Unit */
bar(s = it.<get-type>())
}
)
}