File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1007,7 +1007,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1007
1007
case tp1 : MatchType =>
1008
1008
def compareMatch = tp2 match {
1009
1009
case tp2 : MatchType =>
1010
- isSameType(tp1.scrutinee, tp2.scrutinee) &&
1010
+ isSameType(tp1.scrutinee.widenSkolem , tp2.scrutinee.widenSkolem ) &&
1011
1011
tp1.cases.corresponds(tp2.cases)(isSubType)
1012
1012
case _ => false
1013
1013
}
Original file line number Diff line number Diff line change @@ -4954,7 +4954,7 @@ object Types {
4954
4954
trace(i " reduce match type $this $hashCode" , matchTypes, show = true ) {
4955
4955
def matchCases (cmp : TrackingTypeComparer ): Type =
4956
4956
val saved = ctx.typerState.snapshot()
4957
- try cmp.matchCases(scrutinee.normalized, cases)
4957
+ try cmp.matchCases(scrutinee.normalized.widenSkolem , cases)
4958
4958
catch case ex : Throwable =>
4959
4959
handleRecursive(" reduce type " , i " $scrutinee match ... " , ex)
4960
4960
finally
You can’t perform that action at this time.
0 commit comments