aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Constraint.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-29 20:07:51 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:35:03 +0200
commit02ce995f44c2252f7f7c0f07aa2a86f045b51ac2 (patch)
tree70768b1bf1aeec2e1f56acc6d0c390d9e9538cb5 /src/dotty/tools/dotc/core/Constraint.scala
parent73dd03944cdfbc2588e9e41f407e0ad3a48abe96 (diff)
downloaddotty-02ce995f44c2252f7f7c0f07aa2a86f045b51ac2.tar.gz
dotty-02ce995f44c2252f7f7c0f07aa2a86f045b51ac2.tar.bz2
dotty-02ce995f44c2252f7f7c0f07aa2a86f045b51ac2.zip
Refactoring of PolyType and TypeLambda
Make them each inherit from common BaseType GenericType. That way we avoid inheriting accidentally stuff from PolyType in TypeLambda. Also, Fix adaptation of type lambdas. Don't confuse them with PolyTypes.
Diffstat (limited to 'src/dotty/tools/dotc/core/Constraint.scala')
-rw-r--r--src/dotty/tools/dotc/core/Constraint.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Constraint.scala b/src/dotty/tools/dotc/core/Constraint.scala
index 19f93ce47..38f714131 100644
--- a/src/dotty/tools/dotc/core/Constraint.scala
+++ b/src/dotty/tools/dotc/core/Constraint.scala
@@ -23,7 +23,7 @@ abstract class Constraint extends Showable {
type This <: Constraint
/** Does the constraint's domain contain the type parameters of `pt`? */
- def contains(pt: PolyType): Boolean
+ def contains(pt: GenericType): Boolean
/** Does the constraint's domain contain the type parameter `param`? */
def contains(param: PolyParam): Boolean
@@ -79,7 +79,7 @@ abstract class Constraint extends Showable {
* satisfiability but will solved to give instances of
* type variables.
*/
- def add(poly: PolyType, tvars: List[TypeVar])(implicit ctx: Context): This
+ def add(poly: GenericType, tvars: List[TypeVar])(implicit ctx: Context): This
/** A new constraint which is derived from this constraint by updating
* the entry for parameter `param` to `tp`.
@@ -122,13 +122,13 @@ abstract class Constraint extends Showable {
* entry array, but is going to be removed at the same step,
* or -1 if no such parameter exists.
*/
- def isRemovable(pt: PolyType, removedParam: Int = -1): Boolean
+ def isRemovable(pt: GenericType, removedParam: Int = -1): Boolean
/** A new constraint with all entries coming from `pt` removed. */
- def remove(pt: PolyType)(implicit ctx: Context): This
+ def remove(pt: GenericType)(implicit ctx: Context): This
/** The polytypes constrained by this constraint */
- def domainPolys: List[PolyType]
+ def domainPolys: List[GenericType]
/** The polytype parameters constrained by this constraint */
def domainParams: List[PolyParam]