diff options
author | Martin Odersky <odersky@gmail.com> | 2014-06-12 15:46:44 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-06-12 15:47:46 +0200 |
commit | c4f96837538e953df3473107bd5d622092f74d80 (patch) | |
tree | b6f0cd0b6b12f129089964fe489df1ecb94ff751 /src/dotty/tools/dotc/core/Types.scala | |
parent | 4e287d506eeb1d0463c3efd275327b55fce452f2 (diff) | |
download | dotty-c4f96837538e953df3473107bd5d622092f74d80.tar.gz dotty-c4f96837538e953df3473107bd5d622092f74d80.tar.bz2 dotty-c4f96837538e953df3473107bd5d622092f74d80.zip |
Fixing hashing for RefinedThis types.
... to bring it in sync with equals.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 827e851a9..8677ec6d2 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1757,7 +1757,7 @@ object Types { } } - // ----- Bound types: MethodParam, PolyParam, RefiendThis -------------------------- + // ----- Bound types: MethodParam, PolyParam, RefinedThis -------------------------- abstract class BoundType extends CachedProxyType with ValueType { type BT <: BindingType @@ -1821,7 +1821,7 @@ object Types { // need to customize hashCode and equals to prevent infinite recursion for // refinements that refer to the refinement type via this - override def computeHash = identityHash + override def computeHash = addDelta(binder.identityHash, 41) override def equals(that: Any) = that match { case that: RefinedThis => this.binder eq that.binder case _ => false |