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 {
983
983
984
984
/** A type has been covered previously in subtype checking if it
985
985
* 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.
990
987
*/
991
- private def isCovered (tp : Type ): Boolean = tp.dealias.stripTypeVar match {
988
+ private def isCovered (tp : Type ): Boolean = tp.dealias.stripTypeVar match {
992
989
case tp : TypeRef => tp.symbol.isClass && tp.symbol != NothingClass && tp.symbol != NullClass
993
- case tp : ProtoType => false
994
990
case tp : RefinedOrRecType => isCovered(tp.parent)
995
991
case tp : AnnotatedType => isCovered(tp.underlying)
996
992
case tp : AndOrType => isCovered(tp.tp1) && isCovered(tp.tp2)
You can’t perform that action at this time.
0 commit comments