aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Hashable.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-11-04 12:05:06 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-11-04 12:05:18 +0100
commit4e86a9dd62560381a6caf960470ea5e4db636fff (patch)
tree95f19e782cad9ae234a28a4ec9b64c6cf422ae0a /src/dotty/tools/dotc/core/Hashable.scala
parentb1cb0afd6bce37d8e7e77f1a64e6db82a0d7bb86 (diff)
downloaddotty-4e86a9dd62560381a6caf960470ea5e4db636fff.tar.gz
dotty-4e86a9dd62560381a6caf960470ea5e4db636fff.tar.bz2
dotty-4e86a9dd62560381a6caf960470ea5e4db636fff.zip
Hashable: make finishHash protected.
Is in sync with hashSeed being protected.
Diffstat (limited to 'src/dotty/tools/dotc/core/Hashable.scala')
-rw-r--r--src/dotty/tools/dotc/core/Hashable.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Hashable.scala b/src/dotty/tools/dotc/core/Hashable.scala
index 3eb08d774..9d3356887 100644
--- a/src/dotty/tools/dotc/core/Hashable.scala
+++ b/src/dotty/tools/dotc/core/Hashable.scala
@@ -30,24 +30,24 @@ trait Hashable {
protected def hashSeed: Int = getClass.hashCode
- private def finishHash(hashCode: Int, arity: Int): Int =
+ protected final def finishHash(hashCode: Int, arity: Int): Int =
avoidNotCached(hashing.finalizeHash(hashCode, arity))
final def identityHash = avoidNotCached(System.identityHashCode(this))
- private def finishHash(seed: Int, arity: Int, tp: Type): Int = {
+ protected def finishHash(seed: Int, arity: Int, tp: Type): Int = {
val elemHash = tp.hash
if (elemHash == NotCached) return NotCached
finishHash(hashing.mix(seed, elemHash), arity + 1)
}
- private def finishHash(seed: Int, arity: Int, tp1: Type, tp2: Type): Int = {
+ protected def finishHash(seed: Int, arity: Int, tp1: Type, tp2: Type): Int = {
val elemHash = tp1.hash
if (elemHash == NotCached) return NotCached
finishHash(hashing.mix(seed, elemHash), arity + 1, tp2)
}
- private def finishHash(seed: Int, arity: Int, tps: List[Type]): Int = {
+ protected def finishHash(seed: Int, arity: Int, tps: List[Type]): Int = {
var h = seed
var xs = tps
var len = arity
@@ -61,7 +61,7 @@ trait Hashable {
finishHash(h, len)
}
- private def finishHash(seed: Int, arity: Int, tp: Type, tps: List[Type]): Int = {
+ protected def finishHash(seed: Int, arity: Int, tp: Type, tps: List[Type]): Int = {
val elemHash = tp.hash
if (elemHash == NotCached) return NotCached
finishHash(hashing.mix(seed, elemHash), arity + 1, tps)