We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2f0fc1 commit f780a37Copy full SHA for f780a37
src/dotty/tools/dotc/core/Definitions.scala
@@ -589,10 +589,7 @@ class Definitions {
589
}
590
591
def isBottomClass(cls: Symbol) = cls == NothingClass || cls == NullClass
592
- def isBottomType(tp: Type) = tp match {
593
- case tp: TypeRef => isBottomClass(tp.symbol)
594
- case _ => false
595
- }
+ def isBottomType(tp: Type) = tp.derivesFrom(NothingClass) || tp.derivesFrom(NullClass)
596
597
def isFunctionClass(cls: Symbol) = isVarArityClass(cls, tpnme.Function)
598
def isAbstractFunctionClass(cls: Symbol) = isVarArityClass(cls, tpnme.AbstractFunction)
0 commit comments