File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1824,12 +1824,14 @@ object SymDenotations {
1824
1824
)
1825
1825
1826
1826
final override def isSubClass (base : Symbol )(using Context ): Boolean =
1827
- derivesFrom(base) ||
1828
- base.isClass && (
1829
- (symbol eq defn.NothingClass ) ||
1830
- (! ctx.explicitNulls || ctx.phase.erasedTypes)
1831
- && (symbol eq defn.NullClass )
1832
- && (base ne defn.NothingClass ))
1827
+ derivesFrom(base)
1828
+ || base.isClass
1829
+ && (
1830
+ (symbol eq defn.NothingClass )
1831
+ || (symbol eq defn.NullClass )
1832
+ && (! ctx.mode.is(Mode .SafeNulls ) || ctx.phase.erasedTypes)
1833
+ && (base ne defn.NothingClass )
1834
+ )
1833
1835
1834
1836
/** Is it possible that a class inherits both `this` and `that`?
1835
1837
*
You can’t perform that action at this time.
0 commit comments