Skip to content

Commit 85c3d48

Browse files
committed
Strengthen isMultiSingleton
We missed some cases before.
1 parent 70eae28 commit 85c3d48

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ trait ConstraintHandling {
253253
case tp: SingletonType => true
254254
case AndType(tp1, tp2) => isMultiSingleton(tp1) | isMultiSingleton(tp2)
255255
case OrType(tp1, tp2) => isMultiSingleton(tp1) & isMultiSingleton(tp2)
256+
case tp: TypeRef => isMultiSingleton(tp.info.hiBound)
257+
case tp: TypeVar => isMultiSingleton(tp.underlying)
258+
case tp: TypeParamRef => isMultiSingleton(bounds(tp).hi)
256259
case _ => false
257260
}
258261
def isFullyDefined(tp: Type): Boolean = tp match {

0 commit comments

Comments
 (0)