Skip to content

Commit 4d6d72d

Browse files
Give on disjointness when seeing a Singleton type on either side
1 parent ab1d64d commit 4d6d72d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,9 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
25302530
}.apply(true, tp)
25312531

25322532
(tp1.dealias, tp2.dealias) match {
2533-
case (tp1: TypeRef, tp2: TypeRef) if tp1.symbol == defn.SingletonClass || tp2.symbol == defn.SingletonClass =>
2533+
case (tp1: TypeRef, _) if tp1.symbol == defn.SingletonClass =>
2534+
false
2535+
case (_, tp2: TypeRef) if tp2.symbol == defn.SingletonClass =>
25342536
false
25352537
case (tp1: ConstantType, tp2: ConstantType) =>
25362538
tp1 != tp2

0 commit comments

Comments
 (0)