[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:
committed by
Space Team
parent
a4a0da267e
commit
f9df4e1487
@@ -10,6 +10,14 @@ value class Z {
|
||||
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
|
||||
@@ -21,14 +29,6 @@ value class Z {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#s.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Z(" + "s=" + <this>.#s + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
val equals: KFunction2<Z, Any?, Boolean>
|
||||
|
||||
Reference in New Issue
Block a user