diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index e1dd64ab5..72c61d224 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -381,6 +381,10 @@ object SymDenotations { final def isNonValueClass(implicit ctx: Context): Boolean = isClass && !derivesFrom(defn.AnyValClass) + /** Is this symbol a class references to which that are supertypes of null? */ + final def isNullableClass(implicit ctx: Context): Boolean = + isNonValueClass && !(this is ModuleClass) // todo: check that class does not derive from NotNull? + /** Is this definition accessible as a member of tree with type `pre`? * @param pre The type of the tree from which the selection is made * @param superAccess Access is via super |