Skip to content

Commit 4d198ec

Browse files
committed
Fix stability condition in hasMatchingMember
1 parent e22dfcc commit 4d198ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] {
11481148
def matchAbstractTypeMember(info1: Type) = info1 match {
11491149
case TypeBounds(lo, hi) if lo ne hi =>
11501150
tp2.refinedInfo match {
1151-
case rinfo2: TypeBounds if tp1.widenExpr.isSingleton =>
1151+
case rinfo2: TypeBounds if tp1.isStable =>
11521152
val ref1 = tp1.widenExpr.select(name)
11531153
isSubType(rinfo2.lo, ref1) && isSubType(ref1, rinfo2.hi)
11541154
case _ =>

0 commit comments

Comments
 (0)