aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/OrderingConstraint.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-27 15:13:23 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-27 15:13:23 +0100
commita4937916037f74b414c9bab1819681ed2ecd7fdc (patch)
tree71cf57f98ad8a49096711614fa6ec2c858f8d614 /src/dotty/tools/dotc/core/OrderingConstraint.scala
parenteb4d80891bcfaf9ffa402ea36f1562c5f597e479 (diff)
downloaddotty-a4937916037f74b414c9bab1819681ed2ecd7fdc.tar.gz
dotty-a4937916037f74b414c9bab1819681ed2ecd7fdc.tar.bz2
dotty-a4937916037f74b414c9bab1819681ed2ecd7fdc.zip
Fixups taking into account reviewer's comments.
Diffstat (limited to 'src/dotty/tools/dotc/core/OrderingConstraint.scala')
-rw-r--r--src/dotty/tools/dotc/core/OrderingConstraint.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/OrderingConstraint.scala b/src/dotty/tools/dotc/core/OrderingConstraint.scala
index ec2a65416..e265c0b98 100644
--- a/src/dotty/tools/dotc/core/OrderingConstraint.scala
+++ b/src/dotty/tools/dotc/core/OrderingConstraint.scala
@@ -14,10 +14,10 @@ import reflect.ClassTag
object OrderingConstraint {
- /** The type of `Constraint#boundsMap` */
+ /** The type of `OrderingConstraint#boundsMap` */
type ParamBounds = SimpleMap[PolyType, Array[Type]]
- /** The type of `Constraint#lowerMap`, `Constraint#upperMap` */
+ /** The type of `OrderingConstraint#lowerMap`, `OrderingConstraint#upperMap` */
type ParamOrdering = SimpleMap[PolyType, Array[List[PolyParam]]]
/** A new constraint with given maps */
@@ -117,10 +117,10 @@ import OrderingConstraint._
*
* @param lowerMap a map from PolyTypes to arrays. Each array entry corresponds
* to a parameter P of the polytype; it contains all constrained parameters
- * Q that are known to be smaller than P, i.e. P <: Q.
+ * Q that are known to be smaller than P, i.e. Q <: P.
* @param upperMap a map from PolyTypes to arrays. Each array entry corresponds
* to a parameter P of the polytype; it contains all constrained parameters
- * Q that are known to be greater than P, i.e. Q <: P.
+ * Q that are known to be greater than P, i.e. P <: Q.
*/
class OrderingConstraint(private val boundsMap: ParamBounds,
private val lowerMap : ParamOrdering,
@@ -272,8 +272,8 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
// ---------- Updates ------------------------------------------------------------
- /** An updated partial order matrix that incorporates `less` and also reflects that `param` relates
- * to `p2` wrt <:< if `inOrder` is true, `>:>` otherwise.
+ /** Add the fact `param1 <: param2` to the constraint `current` and propagate
+ * `<:<` relationships between parameters ("edges") but not bounds.
*/
private def order(current: This, param1: PolyParam, param2: PolyParam)(implicit ctx: Context): This =
if (param1 == param2 || current.isLess(param1, param2)) this