Files
kotlin/idea/testData/codeInsight/generate/equalsWithHashCode/dataClassHasArrayProperty.kt.after
2017-06-16 15:03:52 +03:00

18 lines
386 B
Plaintext
Vendored

import java.util.Arrays
data class A(val a: IntArray) {
<caret>override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
other as A
if (!Arrays.equals(a, other.a)) return false
return true
}
override fun hashCode(): Int {
return Arrays.hashCode(a)
}
}