@@ -704,20 +704,18 @@ object TypeOps:
704
704
val hiBound = instantiate(bounds.hi, skolemizedArgTypes)
705
705
val loBound = instantiate(bounds.lo, skolemizedArgTypes)
706
706
707
- def check (tp1 : Type , tp2 : Type , which : String , bound : Type )(using Context ) = {
708
- val isSub = TypeComparer .explaining { cmp =>
709
- val isSub = cmp.isSubType(tp1, tp2)
710
- if ! isSub then
711
- if ! ctx.typerState.constraint.domainLambdas.isEmpty then
712
- typr.println(i " ${ctx.typerState.constraint}" )
713
- if ! ctx.gadt.symbols.isEmpty then
714
- typr.println(i " ${ctx.gadt}" )
715
- typr.println(cmp.lastTrace(i " checkOverlapsBounds( $lo, $hi, $arg, $bounds)( $which) " ))
716
- // trace.dumpStack()
717
- isSub
718
- }// (using ctx.fresh.setSetting(ctx.settings.verbose, true)) // uncomment to enable moreInfo in ExplainingTypeComparer recur
719
- if ! isSub then violations += ((arg, which, bound))
720
- }
707
+ def check (tp1 : Type , tp2 : Type , which : String , bound : Type )(using Context ) =
708
+ val isSub = TypeComparer .isSubType(tp1, tp2)
709
+ if ! isSub then
710
+ // inContext(ctx.fresh.setSetting(ctx.settings.verbose, true)): // uncomment to enable moreInfo in ExplainingTypeComparer
711
+ TypeComparer .explaining: cmp =>
712
+ if ! ctx.typerState.constraint.domainLambdas.isEmpty then
713
+ typr.println(i " ${ctx.typerState.constraint}" )
714
+ if ! ctx.gadt.symbols.isEmpty then
715
+ typr.println(i " ${ctx.gadt}" )
716
+ typr.println(cmp.lastTrace(i " checkOverlapsBounds( $lo, $hi, $arg, $bounds)( $which) " ))
717
+ violations += ((arg, which, bound))
718
+
721
719
check(lo, hiBound, " upper" , hiBound)(using checkCtx)
722
720
check(loBound, hi, " lower" , loBound)(using checkCtx)
723
721
}
0 commit comments