Files
kotlin-fork/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

59 lines
1.2 KiB
Plaintext
Vendored

data class Test<T : Any?> {
constructor(x: T, y: String = "") /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: T
field = x
get
val y: String
field = y
get
operator fun component1(): T {
return <this>.#x
}
operator fun component2(): String {
return <this>.#y
}
fun copy(x: T = <this>.#x, y: String = <this>.#y): Test<T> {
return Test<T>(x = x, y = y)
}
override fun toString(): String {
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
}
override fun hashCode(): Int {
var result: Int = when {
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
else -> <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 Test<T> -> return false
}
val tmp0_other_with_cast: Test<T> = other as Test<T>
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
}
}