@@ -498,7 +498,7 @@ object SymDenotations {
498498 /** `fullName` where `.' is the separator character */
499499 def fullName (using Context ): Name = fullNameSeparated(QualifiedName )
500500
501- private var myTargetName : Name = null
501+ private var myTargetName : Name | Null = null
502502
503503 private def computeTargetName (targetNameAnnot : Option [Annotation ])(using Context ): Name =
504504 targetNameAnnot match
@@ -529,9 +529,9 @@ object SymDenotations {
529529 else carrier.getAnnotation(defn.TargetNameAnnot )
530530 myTargetName = computeTargetName(targetNameAnnot)
531531 if name.is(SuperAccessorName ) then
532- myTargetName = myTargetName.unmangle(List (ExpandedName , SuperAccessorName , ExpandPrefixName ))
532+ myTargetName = myTargetName.nn. unmangle(List (ExpandedName , SuperAccessorName , ExpandPrefixName ))
533533
534- myTargetName
534+ myTargetName.nn
535535
536536 // ----- Tests -------------------------------------------------
537537
@@ -834,7 +834,7 @@ object SymDenotations {
834834 * As a side effect, drop Local flags of members that are not accessed via the ThisType
835835 * of their owner.
836836 */
837- final def isAccessibleFrom (pre : Type , superAccess : Boolean = false , whyNot : StringBuffer = null )(using Context ): Boolean = {
837+ final def isAccessibleFrom (pre : Type , superAccess : Boolean = false , whyNot : StringBuffer | Null = null )(using Context ): Boolean = {
838838
839839 /** Are we inside definition of `boundary`?
840840 * If this symbol is Java defined, package structure is interpreted to be flat.
@@ -864,7 +864,7 @@ object SymDenotations {
864864 /** Is protected access to target symbol permitted? */
865865 def isProtectedAccessOK : Boolean =
866866 inline def fail (str : String ): false =
867- if whyNot != null then whyNot.append(str)
867+ if whyNot != null then whyNot.nn. append(str)
868868 false
869869 val cls = owner.enclosingSubClass
870870 if ! cls.exists then
@@ -1240,7 +1240,7 @@ object SymDenotations {
12401240 .map(tpd.definedSym)
12411241 .find(_.name == name)
12421242 .getOrElse(NoSymbol )
1243- else if (ctx.scope == null )
1243+ else if (( ctx.scope: Scope | Null ) == null ) // TODO
12441244 NoSymbol
12451245 else if (ctx.scope.lookup(this .name) == symbol)
12461246 ctx.scope.lookup(name)
@@ -1534,10 +1534,10 @@ object SymDenotations {
15341534 owner : Symbol = this .owner,
15351535 name : Name = this .name,
15361536 initFlags : FlagSet = UndefinedFlags ,
1537- info : Type = null ,
1538- privateWithin : Symbol = null ,
1539- annotations : List [Annotation ] = null ,
1540- rawParamss : List [List [Symbol ]] = null )(
1537+ info : Type | Null = null ,
1538+ privateWithin : Symbol | Null = null ,
1539+ annotations : List [Annotation ] | Null = null ,
1540+ rawParamss : List [List [Symbol ]] | Null = null )(
15411541 using Context ): SymDenotation = {
15421542 // simulate default parameters, while also passing implicit context ctx to the default values
15431543 val initFlags1 = (if (initFlags != UndefinedFlags ) initFlags else this .flags)
@@ -1562,7 +1562,7 @@ object SymDenotations {
15621562 /** Are `info1` and `info2` ClassInfo types with different parents?
15631563 * @param completersMatter if `true`, consider parents changed if `info1` or `info2 `is a type completer
15641564 */
1565- protected def changedClassParents (info1 : Type , info2 : Type , completersMatter : Boolean ): Boolean =
1565+ protected def changedClassParents (info1 : Type | Null , info2 : Type | Null , completersMatter : Boolean ): Boolean =
15661566 info2 match {
15671567 case info2 : ClassInfo =>
15681568 info1 match {
@@ -1704,15 +1704,15 @@ object SymDenotations {
17041704
17051705 // ----- caches -------------------------------------------------------
17061706
1707- private var myTypeParams : List [TypeSymbol ] = null
1707+ private var myTypeParams : List [TypeSymbol ] | Null = null
17081708 private var fullNameCache : SimpleIdentityMap [QualifiedNameKind , Name ] = SimpleIdentityMap .empty
17091709
1710- private var myMemberCache : EqHashMap [Name , PreDenotation ] = null
1710+ private var myMemberCache : EqHashMap [Name , PreDenotation ] | Null = null
17111711 private var myMemberCachePeriod : Period = Nowhere
17121712
17131713 /** A cache from types T to baseType(T, C) */
17141714 type BaseTypeMap = EqHashMap [CachedType , Type ]
1715- private var myBaseTypeCache : BaseTypeMap = null
1715+ private var myBaseTypeCache : BaseTypeMap | Null = null
17161716 private var myBaseTypeCachePeriod : Period = Nowhere
17171717
17181718 private var baseDataCache : BaseData = BaseData .None
@@ -1753,7 +1753,7 @@ object SymDenotations {
17531753 invalidateMemberNamesCache()
17541754
17551755 def invalidateMemberCachesFor (sym : Symbol )(using Context ): Unit =
1756- if myMemberCache != null then myMemberCache.remove(sym.name)
1756+ if myMemberCache != null then myMemberCache.uncheckedNN. remove(sym.name)
17571757 if ! sym.flagsUNSAFE.is(Private ) then
17581758 invalidateMemberNamesCache()
17591759 if sym.isWrappedToplevelDef then
0 commit comments