aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-29 13:15:28 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-29 13:16:55 +0100
commita80cf94570cdd7eaa1b7a9a8c82fe7e535688a91 (patch)
treed1dbcdd55c74d2550dbc98b1052c61fc74339889 /src/dotty/tools/dotc/core/Types.scala
parent03d0ffc637d650da2678619cfb84a09b08273787 (diff)
downloaddotty-a80cf94570cdd7eaa1b7a9a8c82fe7e535688a91.tar.gz
dotty-a80cf94570cdd7eaa1b7a9a8c82fe7e535688a91.tar.bz2
dotty-a80cf94570cdd7eaa1b7a9a8c82fe7e535688a91.zip
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.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala5
1 files changed, 4 insertions, 1 deletions
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
}