Files
kotlin-fork/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt
T
Mads Ager 6622846bc1 [JVM IR] Do not put destructuring params or underscores in LVT.
Putting them in the local variable table means that the debugger
needs to have special handling for parameters with specific names.
That forces us to generate mangled names for these.

Instead of also implementing the name mangling for FIR, this
change gets rid of the parameters from the LVT instead.
2021-11-02 15:13:14 +03:00

66 lines
1.3 KiB
Plaintext
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