aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Constraint.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-08-26 10:26:22 +0200
committerMartin Odersky <odersky@gmail.com>2016-08-26 17:57:09 +0200
commiteef9be9817f5c0516e221aab1d14d748a12b386c (patch)
tree594a623f4eb0034e083621e58c98ff63dd5a1b40 /src/dotty/tools/dotc/core/Constraint.scala
parent959ea0cad3a2ffe441b5e406d26cddbd6cc431ee (diff)
downloaddotty-eef9be9817f5c0516e221aab1d14d748a12b386c.tar.gz
dotty-eef9be9817f5c0516e221aab1d14d748a12b386c.tar.bz2
dotty-eef9be9817f5c0516e221aab1d14d748a12b386c.zip
Implement constraint merging
Not used yet, but we might use it as an alternative to typedArg invalidation later.
Diffstat (limited to 'src/dotty/tools/dotc/core/Constraint.scala')
-rw-r--r--src/dotty/tools/dotc/core/Constraint.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Constraint.scala b/src/dotty/tools/dotc/core/Constraint.scala
index 436b035dc..99b4af0a9 100644
--- a/src/dotty/tools/dotc/core/Constraint.scala
+++ b/src/dotty/tools/dotc/core/Constraint.scala
@@ -143,6 +143,9 @@ abstract class Constraint extends Showable {
/** The uninstantiated typevars of this constraint */
def uninstVars: collection.Seq[TypeVar]
+ /** The weakest constraint that subsumes both this constraint and `other` */
+ def & (other: Constraint)(implicit ctx: Context): Constraint
+
/** Check that no constrained parameter contains itself as a bound */
def checkNonCyclic()(implicit ctx: Context): Unit