Skip to content

Commit 1fca48c

Browse files
committed
simplify subtyping of SingletonType?
1 parent fb0f0d2 commit 1fca48c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reflect/scala/reflect/internal/tpe/TypeComparers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ trait TypeComparers {
372372
private def isSubType2(tp1: Type, tp2: Type, depth: Depth): Boolean = {
373373
def retry(lhs: Type, rhs: Type) = ((lhs ne tp1) || (rhs ne tp2)) && isSubType(lhs, rhs, depth)
374374

375-
// TODO SIP-23: should this just be tp1.isInstanceOf[SingletonType] && tp2.isInstanceOf[SingletonType]
376-
if (isSingleType(tp1) && isSingleType(tp2) || isConstantType(tp1) && isConstantType(tp2))
375+
// TODO SIP-23
376+
if (tp1.isInstanceOf[SingletonType] && tp2.isInstanceOf[SingletonType])
377377
return (tp1 =:= tp2) || isThisAndSuperSubtype(tp1, tp2) || retry(tp1.underlying, tp2)
378378

379379
if (tp1.isHigherKinded || tp2.isHigherKinded)

0 commit comments

Comments
 (0)