[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
@@ -9,6 +9,14 @@ value class IT {
field = x
get
override fun toString(): String {
return "IT(" + "x=" + <this>.#x + ")"
}
override fun hashCode(): Int {
return <this>.#x.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
other !is IT -> return false
@@ -20,14 +28,6 @@ value class IT {
return true
}
override fun hashCode(): Int {
return <this>.#x.hashCode()
}
override fun toString(): String {
return "IT(" + "x=" + <this>.#x + ")"
}
}
value class InlineMutableSet : MutableSet<IT> {
@@ -86,6 +86,14 @@ value class InlineMutableSet : MutableSet<IT> {
return <this>.<get-ms>().retainAll(elements = elements)
}
override fun toString(): String {
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
}
override fun hashCode(): Int {
return <this>.#ms.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
other !is InlineMutableSet -> return false
@@ -97,13 +105,5 @@ value class InlineMutableSet : MutableSet<IT> {
return true
}
override fun hashCode(): Int {
return <this>.#ms.hashCode()
}
override fun toString(): String {
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
}
}