aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-16 17:07:10 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commit31ab8804d611343eb3cf35e2c1b929d5b65a946e (patch)
tree886cce4d249fdcca4de5d9b5e10c627d23c346b4 /compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
parentc024a6037f3dd7e7458d936566cd4b653b8b7545 (diff)
downloaddotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.tar.gz
dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.tar.bz2
dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.zip
Harmonize paramTypes and paramBounds
MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
index a12936c58..34662cbff 100644
--- a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
+++ b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
@@ -303,7 +303,7 @@ trait ConstraintHandling {
/** The current bounds of type parameter `param` */
final def bounds(param: PolyParam): TypeBounds = {
val e = constraint.entry(param)
- if (e.exists) e.bounds else param.binder.paramBounds(param.paramNum)
+ if (e.exists) e.bounds else param.binder.paramInfos(param.paramNum)
}
/** Add polytype `pt`, possibly with type variables `tvars`, to current constraint
@@ -362,7 +362,7 @@ trait ConstraintHandling {
def apply(t: Type): Type = t match {
case t @ PolyParam(pt: PolyType, n) if comparedPolyTypes contains pt =>
val effectiveVariance = if (fromBelow) -variance else variance
- val bounds = pt.paramBounds(n)
+ val bounds = pt.paramInfos(n)
if (effectiveVariance > 0) bounds.lo
else if (effectiveVariance < 0) bounds.hi
else NoType