diff options
Diffstat (limited to 'src/dotty')
-rw-r--r-- | src/dotty/tools/dotc/core/Hashable.scala | 10 |
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) |