File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -983,14 +983,10 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
983983
984984 /** A type has been covered previously in subtype checking if it
985985 * is some combination of TypeRefs that point to classes, where the
986- * combiners are RefinedTypes, RecTypes, AndTypes or AnnotatedTypes.
987- * One exception: Refinements referring to basetype args are never considered
988- * to be already covered. This is necessary because such refined types might
989- * still need to be compared with a compareAliasRefined.
986+ * combiners are RefinedTypes, RecTypes, And/Or-Types or AnnotatedTypes.
990987 */
991- private def isCovered (tp : Type ): Boolean = tp.dealias.stripTypeVar match {
988+ private def isCovered (tp : Type ): Boolean = tp.dealias.stripTypeVar match {
992989 case tp : TypeRef => tp.symbol.isClass && tp.symbol != NothingClass && tp.symbol != NullClass
993- case tp : ProtoType => false
994990 case tp : RefinedOrRecType => isCovered(tp.parent)
995991 case tp : AnnotatedType => isCovered(tp.underlying)
996992 case tp : AndOrType => isCovered(tp.tp1) && isCovered(tp.tp2)
You can’t perform that action at this time.
0 commit comments