diff options
author | Paul Phillips <paulp@improving.org> | 2010-09-18 17:54:23 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-09-18 17:54:23 +0000 |
commit | df7119adc0b5816a17130ecc2ecf94d995c86d04 (patch) | |
tree | 84156e1d0bdbc572fcbc74bbe639bc775388261d /src | |
parent | 76ce74d7aefda96f6148e2e4b50f3c815dd3c076 (diff) | |
download | scala-df7119adc0b5816a17130ecc2ecf94d995c86d04.tar.gz scala-df7119adc0b5816a17130ecc2ecf94d995c86d04.tar.bz2 scala-df7119adc0b5816a17130ecc2ecf94d995c86d04.zip |
Fixes #3850, no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index 032603bb60..8e927bb70b 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -208,8 +208,14 @@ object ScalaRunTime { @inline def hash(x: Short): Int = x.toInt @inline def hash(x: Byte): Int = x.toInt @inline def hash(x: Char): Int = x.toInt + @inline def hash(x: Boolean): Int = x.hashCode + @inline def hash(x: Unit): Int = 0 @inline def hash(x: Number): Int = runtime.BoxesRunTime.hashFromNumber(x) + + /** XXX Why is there one boxed implementation in here? It would seem + * we should have all the numbers or none of them. + */ @inline def hash(x: java.lang.Long): Int = { val iv = x.intValue if (iv == x.longValue) iv else x.hashCode |