@@ -691,20 +691,18 @@ object TypeOps:
691
691
val hiBound = instantiate(bounds.hi, skolemizedArgTypes)
692
692
val loBound = instantiate(bounds.lo, skolemizedArgTypes)
693
693
694
- def check (tp1 : Type , tp2 : Type , which : String , bound : Type )(using Context ) = {
695
- val isSub = TypeComparer .explaining { cmp =>
696
- val isSub = cmp.isSubType(tp1, tp2)
697
- if ! isSub then
698
- if ! ctx.typerState.constraint.domainLambdas.isEmpty then
699
- typr.println(i " ${ctx.typerState.constraint}" )
700
- if ! ctx.gadt.symbols.isEmpty then
701
- typr.println(i " ${ctx.gadt}" )
702
- typr.println(cmp.lastTrace(i " checkOverlapsBounds( $lo, $hi, $arg, $bounds)( $which) " ))
703
- // trace.dumpStack()
704
- isSub
705
- }// (using ctx.fresh.setSetting(ctx.settings.verbose, true)) // uncomment to enable moreInfo in ExplainingTypeComparer recur
706
- if ! isSub then violations += ((arg, which, bound))
707
- }
694
+ def check (tp1 : Type , tp2 : Type , which : String , bound : Type )(using Context ) =
695
+ val isSub = TypeComparer .isSubType(tp1, tp2)
696
+ if ! isSub then
697
+ // inContext(ctx.fresh.setSetting(ctx.settings.verbose, true)): // uncomment to enable moreInfo in ExplainingTypeComparer
698
+ TypeComparer .explaining: cmp =>
699
+ if ! ctx.typerState.constraint.domainLambdas.isEmpty then
700
+ typr.println(i " ${ctx.typerState.constraint}" )
701
+ if ! ctx.gadt.symbols.isEmpty then
702
+ typr.println(i " ${ctx.gadt}" )
703
+ typr.println(cmp.lastTrace(i " checkOverlapsBounds( $lo, $hi, $arg, $bounds)( $which) " ))
704
+ violations += ((arg, which, bound))
705
+
708
706
check(lo, hiBound, " upper" , hiBound)(using checkCtx)
709
707
check(loBound, hi, " lower" , loBound)(using checkCtx)
710
708
}
0 commit comments