[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>
This commit is contained in:
Vladimir Sukharev
2023-07-18 00:06:48 +00:00
committed by Space Team
parent a4a0da267e
commit f9df4e1487
81 changed files with 890 additions and 4135 deletions
@@ -20,6 +20,14 @@ data class A {
return A(runA = runA)
}
override fun toString(): String {
return "A(" + "runA=" + <this>.#runA + ")"
}
override fun hashCode(): Int {
return <this>.#runA.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -34,14 +42,6 @@ data class A {
return true
}
override fun hashCode(): Int {
return <this>.#runA.hashCode()
}
override fun toString(): String {
return "A(" + "runA=" + <this>.#runA + ")"
}
}
data class B {
@@ -74,6 +74,14 @@ data class B {
return B(x = x)
}
override fun toString(): String {
return "B(" + "x=" + <this>.#x + ")"
}
override fun hashCode(): Int {
return <this>.#x.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -88,12 +96,5 @@ data class B {
return true
}
override fun hashCode(): Int {
return <this>.#x.hashCode()
}
override fun toString(): String {
return "B(" + "x=" + <this>.#x + ")"
}
}