mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
25 lines
598 B
Plaintext
25 lines
598 B
Plaintext
// ERROR: Unresolved reference: javaClass
|
|
// ERROR: Unresolved reference: javaClass
|
|
|
|
open class Base() {
|
|
override fun hashCode(): Int = 0
|
|
fun equals(base: Base?) = false
|
|
}
|
|
|
|
class WithConstructor(x: Int, s: String) : Base() {
|
|
val x: Int = 0
|
|
val s: String = ""
|
|
|
|
override fun hashCode(): Int = 1
|
|
override fun equals(other: Any?): Boolean {
|
|
if (this === other) return true
|
|
if (javaClass != other?.javaClass) return false
|
|
|
|
other as WithConstructor
|
|
|
|
if (x != other.x) return false
|
|
if (s != other.s) return false
|
|
|
|
return true
|
|
}
|
|
} |