mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
16 lines
325 B
Plaintext
Vendored
16 lines
325 B
Plaintext
Vendored
data class A(val n: Int) {
|
|
<caret>override fun equals(other: Any?): Boolean {
|
|
if (this === other) return true
|
|
if (javaClass != other?.javaClass) return false
|
|
|
|
other as A
|
|
|
|
if (n != other.n) return false
|
|
|
|
return true
|
|
}
|
|
|
|
override fun hashCode(): Int {
|
|
return n
|
|
}
|
|
} |