diff options
Diffstat (limited to 'src/library/scala/Predef.scala')
-rw-r--r-- | src/library/scala/Predef.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index c3e0548183..c44ec72299 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -96,12 +96,13 @@ object Predef extends LowPriorityImplicits { // hashcode ----------------------------------------------------------- @inline def hash(x: Any): Int = - if (x.isInstanceOf[Number]) runtime.BoxesRunTime.numHash(x.asInstanceOf[Number]) else x.hashCode + if (x.isInstanceOf[Number]) runtime.BoxesRunTime.hashFromNumber(x.asInstanceOf[Number]) + else x.hashCode @inline def hash(x: Number): Int = - runtime.BoxesRunTime.numHash(x.asInstanceOf[Number]) + runtime.BoxesRunTime.hashFromNumber(x) - @inline def hash(x: Long): Int = { + @inline def hash(x: java.lang.Long): Int = { val iv = x.intValue if (iv == x.longValue) iv else x.hashCode } |