@@ -34,8 +34,6 @@ trait ConstraintHandling[AbstractContext] {
3434 protected def constraint : Constraint
3535 protected def constraint_= (c : Constraint ): Unit
3636
37- protected def externalize (param : TypeParamRef )(implicit ctx : Context ): Type
38-
3937 private [this ] var addConstraintInvocations = 0
4038
4139 /** If the constraint is frozen we cannot add new bounds to the constraint. */
@@ -71,28 +69,20 @@ trait ConstraintHandling[AbstractContext] {
7169 case tp => tp
7270 }
7371
74- def nonParamBounds (param : TypeParamRef )(implicit ctx : Context ): TypeBounds =
75- constraint.nonParamBounds(param) match {
76- case TypeAlias (tpr : TypeParamRef ) => TypeAlias (externalize(tpr))
77- case tb => tb
78- }
72+ def nonParamBounds (param : TypeParamRef )(implicit actx : AbstractContext ): TypeBounds = constraint.nonParamBounds(param)
7973
80- def fullLowerBound (param : TypeParamRef )(implicit ctx : Context ): Type =
81- (nonParamBounds(param).lo /: constraint.minLower(param)) {
82- (t, u) => t | externalize(u)
83- }
74+ def fullLowerBound (param : TypeParamRef )(implicit actx : AbstractContext ): Type =
75+ (nonParamBounds(param).lo /: constraint.minLower(param))(_ | _)
8476
85- def fullUpperBound (param : TypeParamRef )(implicit ctx : Context ): Type =
86- (nonParamBounds(param).hi /: constraint.minUpper(param)) {
87- (t, u) => t & externalize(u)
88- }
77+ def fullUpperBound (param : TypeParamRef )(implicit actx : AbstractContext ): Type =
78+ (nonParamBounds(param).hi /: constraint.minUpper(param))(_ & _)
8979
9080 /** Full bounds of `param`, including other lower/upper params.
9181 *
9282 * Note that underlying operations perform subtype checks - for this reason, recursing on `fullBounds`
9383 * of some param when comparing types might lead to infinite recursion. Consider `bounds` instead.
9484 */
95- def fullBounds (param : TypeParamRef )(implicit ctx : Context ): TypeBounds =
85+ def fullBounds (param : TypeParamRef )(implicit actx : AbstractContext ): TypeBounds =
9686 nonParamBounds(param).derivedTypeBounds(fullLowerBound(param), fullUpperBound(param))
9787
9888 protected def addOneBound (param : TypeParamRef , bound : Type , isUpper : Boolean )(implicit actx : AbstractContext ): Boolean =
0 commit comments