summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiles Sabin <miles@milessabin.com>2017-04-03 16:46:03 +0100
committerMiles Sabin <miles@milessabin.com>2017-04-03 16:50:33 +0100
commitd6f25c2501c2b6f13cde620d09b8b952d05588b7 (patch)
tree66061c5c3f6f5b6c8195869fe465a86f8cf602ad /src
parentf5ce29b7f4afaf00ac644665963e017a9fa253d9 (diff)
downloadscala-d6f25c2501c2b6f13cde620d09b8b952d05588b7.tar.gz
scala-d6f25c2501c2b6f13cde620d09b8b952d05588b7.tar.bz2
scala-d6f25c2501c2b6f13cde620d09b8b952d05588b7.zip
Make ImplicitInfo hashCode consistent with equals.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index bee2ae8e99..a7eab21942 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -255,7 +255,10 @@ trait Implicits {
this.sym == that.sym
case _ => false
}
- override def hashCode = name.## + pre.## + sym.##
+ override def hashCode = {
+ import scala.util.hashing.MurmurHash3._
+ finalizeHash(mix(mix(productSeed, name.##), sym.##), 2)
+ }
override def toString = (
if (tpeCache eq null) name + ": ?"
else name + ": " + tpe