aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/core/Hashable.scala2
-rw-r--r--src/dotty/tools/dotc/core/Uniques.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Hashable.scala b/src/dotty/tools/dotc/core/Hashable.scala
index 3eb08d774..f1af1e67d 100644
--- a/src/dotty/tools/dotc/core/Hashable.scala
+++ b/src/dotty/tools/dotc/core/Hashable.scala
@@ -28,7 +28,7 @@ object Hashable {
trait Hashable {
import Hashable._
- protected def hashSeed: Int = getClass.hashCode
+ protected def hashSeed: Int = getClass.getSimpleName.hashCode
private def finishHash(hashCode: Int, arity: Int): Int =
avoidNotCached(hashing.finalizeHash(hashCode, arity))
diff --git a/src/dotty/tools/dotc/core/Uniques.scala b/src/dotty/tools/dotc/core/Uniques.scala
index b00508d60..0571100a3 100644
--- a/src/dotty/tools/dotc/core/Uniques.scala
+++ b/src/dotty/tools/dotc/core/Uniques.scala
@@ -92,7 +92,7 @@ object Uniques {
}
final class RefinedUniques extends HashSet[RefinedType](Config.initialUniquesCapacity) with Hashable {
- override val hashSeed = classOf[CachedRefinedType].hashCode // some types start life as CachedRefinedTypes, need to have same hash seed
+ override val hashSeed = "CachedRefinedType".hashCode // some types start life as CachedRefinedTypes, need to have same hash seed
override def hash(x: RefinedType): Int = x.hash
private def findPrevious(h: Int, parent: Type, refinedName: Name, refinedInfo: Type): RefinedType = {