Skip to content

Commit

Permalink
Drop a change on MatchAlias in TypeComparer
Browse files Browse the repository at this point in the history
Looks from the test cases that this isn't needed?
  • Loading branch information
dwijnand committed Mar 7, 2024
1 parent cf968a3 commit e4625c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
* tp1 <:< app2 using isSubType (this might instantiate params in tp2)
*/
def compareLower(tycon2bounds: TypeBounds, tyconIsTypeRef: Boolean): Boolean =
if ((tycon2bounds.lo `eq` tycon2bounds.hi) && !tycon2bounds.isInstanceOf[MatchAlias])
if tycon2bounds.lo eq tycon2bounds.hi then
if (tyconIsTypeRef) recur(tp1, tp2.superTypeNormalized) && recordGadtUsageIf(MatchType.thatReducesUsingGadt(tp2))
else isSubApproxHi(tp1, tycon2bounds.lo.applyIfParameterized(args2))
else
Expand Down

0 comments on commit e4625c7

Please sign in to comment.