File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -678,7 +678,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] {
678678 narrowGADTBounds(tp1, tp2, approx, isUpper = true )) &&
679679 GADTusage (tp1.symbol)
680680 }
681- isSubType(hi1, tp2, approx.addLow) || ((tp1.symbol ne NoSymbol ) && compareGADT)
681+ isSubType(hi1, tp2, approx.addLow) || compareGADT
682682 case _ =>
683683 def isNullable (tp : Type ): Boolean = tp.widenDealias match {
684684 case tp : TypeRef => tp.symbol.isNullableClass
@@ -2107,8 +2107,11 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
21072107 }
21082108
21092109 override def gadtBounds (sym : Symbol )(implicit ctx : Context ): TypeBounds = {
2110- footprint += sym.typeRef
2111- super .gadtBounds(sym)
2110+ if (sym eq NoSymbol ) null
2111+ else {
2112+ footprint += sym.typeRef
2113+ super .gadtBounds(sym)
2114+ }
21122115 }
21132116
21142117 override def gadtAddLowerBound (sym : Symbol , b : Type ): Boolean = {
You can’t perform that action at this time.
0 commit comments