mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
18 lines
386 B
Plaintext
Vendored
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)
|
|
}
|
|
} |