We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 530ffb7 commit 7d012f9Copy full SHA for 7d012f9
compiler/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1824,12 +1824,14 @@ object SymDenotations {
1824
)
1825
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))
+ derivesFrom(base)
+ || base.isClass
+ && (
+ (symbol eq defn.NothingClass)
+ || (symbol eq defn.NullClass)
+ && (!ctx.mode.is(Mode.SafeNulls) || ctx.phase.erasedTypes)
1833
+ && (base ne defn.NothingClass)
1834
+ )
1835
1836
/** Is it possible that a class inherits both `this` and `that`?
1837
*
0 commit comments