We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 630c6dc commit 75e7c41Copy full SHA for 75e7c41
compiler/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -1504,7 +1504,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1504
if (fromBelow) recur(other, folded) else recur(folded, other)
1505
} || other.match {
1506
case other: TypeRef if !fromBelow && other.symbol == defn.SingletonClass =>
1507
- true // Even if not declared, the result of a compiletime operator is a constant type
+ tp.args.forall(arg => isSubType(arg, defn.SingletonType))
1508
+ // Compile-time operations with singleton arguments are singletons
1509
case _ => false
1510
}
1511
0 commit comments