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 @@ -3007,12 +3007,19 @@ object TypeComparer {
30073007}
30083008
30093009object TrackingTypeComparer :
3010- enum MatchResult :
3010+ import printing .* , Texts .*
3011+ enum MatchResult extends Showable :
30113012 case Reduced (tp : Type )
30123013 case Disjoint
30133014 case Stuck
30143015 case NoInstance (fails : List [(Name , TypeBounds )])
30153016
3017+ def toText (p : Printer ): Text = this match
3018+ case Reduced (tp) => " Reduced(" ~ p.toText(tp) ~ " )"
3019+ case Disjoint => " Disjoint"
3020+ case Stuck => " Stuck"
3021+ case NoInstance (fails) => " NoInstance(" ~ Text (fails.map(p.toText(_) ~ p.toText(_)), " , " ) ~ " )"
3022+
30163023class TrackingTypeComparer (initctx : Context ) extends TypeComparer (initctx) {
30173024 import TrackingTypeComparer .*
30183025
@@ -3076,7 +3083,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
30763083 }
30773084
30783085 /** Match a single case. */
3079- def matchCase (cas : Type ): MatchResult = trace(i " match case $cas vs $scrut " , matchTypes) {
3086+ def matchCase (cas : Type ): MatchResult = trace(i " $scrut match ${ MatchTypeTrace .caseText(cas)} " , matchTypes, show = true ) {
30803087 val cas1 = cas match {
30813088 case cas : HKTypeLambda =>
30823089 caseLambda = constrained(cas)
You can’t perform that action at this time.
0 commit comments