Sort out JVM intrinsics for equals, hashCode, toString

This commit is contained in:
Alexander Udalov
2014-02-07 15:49:28 +04:00
parent 3dcd85bdb4
commit 774e5f0535
4 changed files with 81 additions and 65 deletions
-55
View File
@@ -25,58 +25,3 @@ public annotation class throws(vararg val exceptionClasses: Class<out Throwable>
get() = (this as java.lang.Object).getClass() as Class<T>
[Intrinsic("kotlin.javaClass.function")] fun <reified T> javaClass() : Class<T> = null as Class<T>
/**
* A helper method for calling hashCode() on Kotlin objects
* TODO remove when Any supports equals() and hashCode()
*/
[Intrinsic("kotlin.hashCode")] public fun Any.hashCode(): Int = (this as java.lang.Object).hashCode()
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Boolean.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Byte.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Short.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Char.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Int.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Float.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Long.toString(): String = (null as String)
/**
* A helper method for calling toString() on Kotlin primitives
* TODO remove when Any supports toString()
*/
[Intrinsic("kotlin.toString")] public fun Double.toString(): String = (null as String)