@@ -223,27 +223,27 @@ final class ProperGadtConstraint private(
223223 override protected def isSub (tp1 : Type , tp2 : Type )(using Context ): Boolean = TypeComparer .isSubType(tp1, tp2)
224224 override protected def isSame (tp1 : Type , tp2 : Type )(using Context ): Boolean = TypeComparer .isSameType(tp1, tp2)
225225
226- override def nonParamBounds (param : TypeParamRef )(using Context ): TypeBounds =
227- val externalizeMap = new TypeMap {
228- def apply (tp : Type ): Type = tp match {
229- case tpr : TypeParamRef => externalize(tpr)
230- case tp => mapOver(tp)
231- }
232- }
233- externalizeMap(constraint.nonParamBounds(param)).bounds
234-
235- override def fullLowerBound (param : TypeParamRef )(using Context ): Type =
236- constraint.minLower(param).foldLeft(nonParamBounds(param).lo) {
237- (t, u) => t | externalize(u)
238- }
239-
240- override def fullUpperBound (param : TypeParamRef )(using Context ): Type =
241- constraint.minUpper(param).foldLeft(nonParamBounds(param).hi) { (t, u) =>
242- val eu = externalize(u)
243- // Any as the upper bound means "no bound", but if F is higher-kinded,
244- // Any & F = F[_]; this is wrong for us so we need to short-circuit
245- if t.isAny then eu else t & eu
246- }
226+ override def nonParamBounds (param : TypeParamRef )(using Context ): TypeBounds =
227+ val externalizeMap = new TypeMap {
228+ def apply (tp : Type ): Type = tp match {
229+ case tpr : TypeParamRef => externalize(tpr)
230+ case tp => mapOver(tp)
231+ }
232+ }
233+ externalizeMap(constraint.nonParamBounds(param)).bounds
234+
235+ override def fullLowerBound (param : TypeParamRef )(using Context ): Type =
236+ constraint.minLower(param).foldLeft(nonParamBounds(param).lo) {
237+ (t, u) => t | externalize(u)
238+ }
239+
240+ override def fullUpperBound (param : TypeParamRef )(using Context ): Type =
241+ constraint.minUpper(param).foldLeft(nonParamBounds(param).hi) { (t, u) =>
242+ val eu = externalize(u)
243+ // Any as the upper bound means "no bound", but if F is higher-kinded,
244+ // Any & F = F[_]; this is wrong for us so we need to short-circuit
245+ if t.isAny then eu else t & eu
246+ }
247247
248248 // ---- Private ----------------------------------------------------------
249249
0 commit comments