From 0b02ede80cfbc9c585114bb0dd51436dbf15de5f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 13 Jan 2015 17:19:17 +0100 Subject: Added structural equals method to PolyParams --- src/dotty/tools/dotc/core/Types.scala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dotty/tools/dotc/core/Types.scala') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 080596321..0363a8c70 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2173,6 +2173,12 @@ object Types { override def toString = s"PolyParam(${binder.paramNames(paramNum)})" override def computeHash = doHash(paramNum, binder) + override def equals(that: Any) = that match { + case that: PolyParam => + (this.binder eq that.binder) && this.paramNum == that.paramNum + case _ => + false + } } /** A skolem type reference with underlying type `binder`. */ -- cgit v1.2.3