Java to Kotlin converter: fixed overriding of Object methods
This commit is contained in:
@@ -23,20 +23,20 @@ class Test() : Base() {
|
||||
}
|
||||
|
||||
class Base() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
|
||||
Reference in New Issue
Block a user