Files
kotlin-fork/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt
T
Ivan Kylchik dd264cff50 [IR] Split const folding into necessary one and for optimizations only
In this commit we have a lot of change in test data. This was caused
by the way where we evaluate constants. We split constant evaluation
into two distinct parts: only necessary evaluations for `fir2ir`
(like const val and annotations) and optimizations for lowering.
Now we don't do all constant evaluation on `fir2ir`, but IR
dump is executed after this phase, so test data changed.

#KT-58923
2023-06-14 19:02:39 +00:00

100 lines
1.9 KiB
Kotlin
Vendored

data class A {
constructor(runA: @ExtensionFunctionType Function2<A, String, Unit> = local fun A.<anonymous>(it: String) {
return Unit
}
) /* primary */ {
super/*Any*/()
/* <init>() */
}
val runA: @ExtensionFunctionType Function2<A, String, Unit>
field = runA
get
operator fun component1(): @ExtensionFunctionType Function2<A, String, Unit> {
return <this>.#runA
}
fun copy(runA: @ExtensionFunctionType Function2<A, String, Unit> = <this>.#runA): A {
return A(runA = runA)
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is A -> return false
}
val tmp0_other_with_cast: A = other as A
when {
EQEQ(arg0 = <this>.#runA, arg1 = tmp0_other_with_cast.#runA).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#runA.hashCode()
}
override fun toString(): String {
return "A(" + "runA=" + <this>.#runA + ")"
}
}
data class B {
constructor(x: Any = { // BLOCK
local class <no name provided> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
<no name provided>()
}) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Any
field = x
get
operator fun component1(): Any {
return <this>.#x
}
fun copy(x: Any = <this>.#x): B {
return B(x = x)
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is B -> return false
}
val tmp0_other_with_cast: B = other as B
when {
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#x.hashCode()
}
override fun toString(): String {
return "B(" + "x=" + <this>.#x + ")"
}
}