Files
kotlin-fork/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt
T
Vladimir Sukharev f9df4e1487 [K/N] Reorder hashCode, toString, equals in data classes to match K1 order
^KT-60247 Fixed

Merge-request: KT-MR-11080
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-07-18 00:06:48 +00:00

66 lines
1.3 KiB
Kotlin
Vendored

sealed class A : CharSequence {
protected constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
data class B : A, CharSequence {
constructor(c: CharSequence) /* primary */ {
super/*A*/()
/* <init>() */
}
override operator fun get(index: Int): Char {
return <this>.#c.get(index = index)
}
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence {
return <this>.#c.subSequence(startIndex = startIndex, endIndex = endIndex)
}
override val length: Int
override get(): Int {
return <this>.#c.<get-length>()
}
val c: CharSequence
field = c
get
operator fun component1(): CharSequence {
return <this>.#c
}
fun copy(c: CharSequence = <this>.#c): B {
return B(c = c)
}
override fun toString(): String {
return "B(" + "c=" + <this>.#c + ")"
}
override fun hashCode(): Int {
return <this>.#c.hashCode()
}
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>.#c, arg1 = tmp0_other_with_cast.#c).not() -> return false
}
return true
}
}
}