aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-16 13:12:37 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-21 18:42:50 +0100
commit77fc4d0831dc7a7ddaa74677e2659cdea4a2f52f (patch)
treea55363c03dca3a56767ed37b0cd36bb5bb009f13 /src/dotty/tools/dotc/core/Types.scala
parentc3f4e845d6354931ac011073219b8a133446c381 (diff)
downloaddotty-77fc4d0831dc7a7ddaa74677e2659cdea4a2f52f.tar.gz
dotty-77fc4d0831dc7a7ddaa74677e2659cdea4a2f52f.tar.bz2
dotty-77fc4d0831dc7a7ddaa74677e2659cdea4a2f52f.zip
Disentangling SelectionProto and RefinedType
There were too many problems caused by it, and too little gained. So, now SelectionProto is no longer a Subtype of RefinedType.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index c3b2e1713..aab70a61b 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -937,8 +937,11 @@ object Types {
/** A marker trait for types that apply only to term symbols */
trait TermType extends Type
+ /** A marker trait for types that can be types of values or prototypes of value types */
+ trait ValueTypeOrProto extends TermType
+
/** A marker trait for types that can be types of values */
- trait ValueType extends TermType
+ trait ValueType extends ValueTypeOrProto
/** A marker trait for types that are guaranteed to contain only a
* single non-null value (they might contain null in addition).
@@ -1283,8 +1286,6 @@ 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.
*/
@@ -1315,8 +1316,7 @@ object Types {
case that: RefinedType =>
this.parent == that.parent &&
this.refinedName == that.refinedName &&
- this.refinedInfo == that.refinedInfo &&
- !that.isProto
+ this.refinedInfo == that.refinedInfo
case _ =>
false
}