Files
kotlin-fork/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt
T
2022-03-30 06:27:59 +00:00

65 lines
1.3 KiB
Kotlin
Vendored

data class A {
constructor(x: Int, y: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
val y: Int
field = y
get
operator fun component1(): Int {
return <this>.#x
}
operator fun component2(): Int {
return <this>.#y
}
fun copy(x: Int = <this>.#x, y: Int = <this>.#y): A {
return A(x = x, y = y)
}
override fun toString(): String {
return "A(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
}
override fun hashCode(): Int {
var result: Int = <this>.#x.hashCode()
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
return result
}
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>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
}
when {
EQEQ(arg0 = <this>.#y, arg1 = tmp0_other_with_cast.#y).not() -> return false
}
return true
}
}
var fn: Function1<A, Int>
field = local fun <anonymous>(<name for destructuring parameter 0>: A): Int {
val y: Int = <name for destructuring parameter 0>.component2()
return 42.plus(other = y)
}
get
set