Files
kotlin-fork/compiler/testData/ir/irText/firProblems/valueClassEquals.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

38 lines
646 B
Kotlin
Vendored

@JvmInline
value class Z {
constructor(s: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val s: String
field = s
get
override fun toString(): String {
return "Z(" + "s=" + <this>.#s + ")"
}
override fun hashCode(): Int {
return <this>.#s.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
other !is Z -> return false
}
val tmp0_other_with_cast: Z = other as Z
when {
EQEQ(arg0 = <this>.#s, arg1 = tmp0_other_with_cast.#s).not() -> return false
}
return true
}
}
val equals: KFunction2<Z, Any?, Boolean>
field = Z::equals
get