From a80cf94570cdd7eaa1b7a9a8c82fe7e535688a91 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 29 Jan 2014 13:15:28 +0100 Subject: Fixing equality for selection protos They no longer can be accidentally equal to refinement type. Todo: Disentangle selection protos entirely from Refinement types? See branch disentangle-selectproto. --- src/dotty/tools/dotc/core/Types.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 63c26a6e7..9357e8d51 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1266,6 +1266,8 @@ object Types { override def underlying(implicit ctx: Context) = parent + protected def isProto: Boolean = false + /** Derived refined type, with a twist: A refinement with a higher-kinded type param placeholder * is transformed to a refinement of the original type parameter if that one exists. */ @@ -1296,7 +1298,8 @@ object Types { case that: RefinedType => this.parent == that.parent && this.refinedName == that.refinedName && - this.refinedInfo == that.refinedInfo + this.refinedInfo == that.refinedInfo && + !that.isProto case _ => false } -- cgit v1.2.3