Generate equals()/hashCode(): Fix hashCode() implementation
#KT-11638 Fixed
This commit is contained in:
+3
-3
@@ -26,9 +26,9 @@ class A(val n: Int, val s: String) : X() {
|
||||
|
||||
override fun hashCode(): Int{
|
||||
var result = super.hashCode()
|
||||
result += 31 * result + n
|
||||
result += 31 * result + s.hashCode()
|
||||
result += 31 * result + f.hashCode()
|
||||
result = 31 * result + n
|
||||
result = 31 * result + s.hashCode()
|
||||
result = 31 * result + f.hashCode()
|
||||
return result
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user