summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-12-09 17:04:08 +0000
committerPaul Phillips <paulp@improving.org>2009-12-09 17:04:08 +0000
commit2411320fdabfe2f36917086c4a256f8a94ffd915 (patch)
tree47357b13d7e711a2bf9819c93b8e101c647a6684 /src
parenta4f1bfec2c2e1067964fad4868ae701374ab1ccd (diff)
downloadscala-2411320fdabfe2f36917086c4a256f8a94ffd915.tar.gz
scala-2411320fdabfe2f36917086c4a256f8a94ffd915.tar.bz2
scala-2411320fdabfe2f36917086c4a256f8a94ffd915.zip
Removed productPrefix from case class hashCode ...
Removed productPrefix from case class hashCode consideration. (It is not used in equality and therefore should not be used in hashCode either.)
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/runtime/ScalaRunTime.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala
index 6067001f7c..f6c4cf79dc 100644
--- a/src/library/scala/runtime/ScalaRunTime.scala
+++ b/src/library/scala/runtime/ScalaRunTime.scala
@@ -99,8 +99,8 @@ object ScalaRunTime {
scala.util.JenkinsHash.hashSeq(x.productPrefix.toSeq ++ x.productIterator.toSeq)
def _hashCode(x: Product): Int = {
- var code = x.productPrefix.hashCode()
val arr = x.productArity
+ var code = arr
var i = 0
while (i < arr) {
val elem = x.productElement(i)