From d6f25c2501c2b6f13cde620d09b8b952d05588b7 Mon Sep 17 00:00:00 2001 From: Miles Sabin Date: Mon, 3 Apr 2017 16:46:03 +0100 Subject: Make ImplicitInfo hashCode consistent with equals. --- src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3