File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2907,12 +2907,19 @@ object TypeComparer {
29072907}
29082908
29092909object TrackingTypeComparer :
2910- enum MatchResult :
2910+ import printing .* , Texts .*
2911+ enum MatchResult extends Showable :
29112912 case Reduced (tp : Type )
29122913 case Disjoint
29132914 case Stuck
29142915 case NoInstance (fails : List [(Name , TypeBounds )])
29152916
2917+ def toText (p : Printer ): Text = this match
2918+ case Reduced (tp) => " Reduced(" ~ p.toText(tp) ~ " )"
2919+ case Disjoint => " Disjoint"
2920+ case Stuck => " Stuck"
2921+ case NoInstance (fails) => " NoInstance(" ~ Text (fails.map(p.toText(_) ~ p.toText(_)), " , " ) ~ " )"
2922+
29162923class TrackingTypeComparer (initctx : Context ) extends TypeComparer (initctx) {
29172924 import TrackingTypeComparer .*
29182925
@@ -2976,7 +2983,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
29762983 }
29772984
29782985 /** Match a single case. */
2979- def matchCase (cas : Type ): MatchResult = trace(i " match case $cas vs $scrut " , matchTypes) {
2986+ def matchCase (cas : Type ): MatchResult = trace(i " $scrut match ${ MatchTypeTrace .caseText(cas)} " , matchTypes, show = true ) {
29802987 val cas1 = cas match {
29812988 case cas : HKTypeLambda =>
29822989 caseLambda = constrained(cas)
You can’t perform that action at this time.
0 commit comments