[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
Vendored
+9
-8
@@ -18,6 +18,14 @@ data class Result {
|
||||
return Result(i = i)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Result(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -32,14 +40,6 @@ data class Result {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#i.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Result(" + "i=" + <this>.#i + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var operationScore: Int
|
||||
@@ -104,3 +104,4 @@ fun box(): String {
|
||||
else -> "fail"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user