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] {
678
678
narrowGADTBounds(tp1, tp2, approx, isUpper = true )) &&
679
679
GADTusage (tp1.symbol)
680
680
}
681
- isSubType(hi1, tp2, approx.addLow) || ((tp1.symbol ne NoSymbol ) && compareGADT)
681
+ isSubType(hi1, tp2, approx.addLow) || compareGADT
682
682
case _ =>
683
683
def isNullable (tp : Type ): Boolean = tp.widenDealias match {
684
684
case tp : TypeRef => tp.symbol.isNullableClass
@@ -2107,8 +2107,11 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
2107
2107
}
2108
2108
2109
2109
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
+ }
2112
2115
}
2113
2116
2114
2117
override def gadtAddLowerBound (sym : Symbol , b : Type ): Boolean = {
You can’t perform that action at this time.
0 commit comments