Skip to content

Commit 9a624b9

Browse files
committed
Nothing is not nullable
1 parent 39719aa commit 9a624b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ object SymDenotations {
616616

617617
/** Is this symbol a class references to which that are supertypes of null? */
618618
final def isNullableClass(implicit ctx: Context): Boolean =
619-
isClass && !isValueClass && !(this is ModuleClass)
619+
isClass && !isValueClass && !(this is ModuleClass) && symbol != defn.NothingClass
620620

621621
/** Is this definition accessible as a member of tree with type `pre`?
622622
* @param pre The type of the tree from which the selection is made

0 commit comments

Comments
 (0)