Java to Kotlin converter: fixed overriding of Object methods

This commit is contained in:
Valentin Kipyatkov
2014-06-04 15:12:37 +04:00
parent dcfa396b50
commit 118b23061b
12 changed files with 169 additions and 222 deletions
@@ -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() {