File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -782,7 +782,7 @@ class Namer { typer: Typer =>
782782
783783 protected def localContext (owner : Symbol ): FreshContext = ctx.fresh.setOwner(owner).setTree(original)
784784
785- var myNotNullInfos : List [NotNullInfo ] | Null = null
785+ private var myNotNullInfos : List [NotNullInfo ] | Null = null
786786
787787 /** The context with which this completer was created */
788788 given creationContext [T ]: Context =
@@ -791,6 +791,9 @@ class Namer { typer: Typer =>
791791 // make sure testing contexts are not captured by completers
792792 assert(! ictx.reporter.isInstanceOf [ExploringReporter ])
793793
794+ def setNotNullInfos (infos : List [NotNullInfo ]): Unit =
795+ myNotNullInfos = infos
796+
794797 protected def typeSig (sym : Symbol ): Type = original match
795798 case original : ValDef =>
796799 if (sym.is(Module )) moduleValSig(sym)
Original file line number Diff line number Diff line change @@ -3297,11 +3297,11 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
32973297 mdef.getAttachment(SymOfTree ) match {
32983298 case Some (sym) => sym.infoOrCompleter match {
32993299 case completer : Namer # Completer =>
3300- if ( completer.creationContext.notNullInfos ne ctx.notNullInfos)
3300+ if completer.creationContext.notNullInfos ne ctx.notNullInfos then
33013301 // The RHS of a val def should know about not null facts established
33023302 // in preceding statements (unless the DefTree is completed ahead of time,
33033303 // then it is impossible).
3304- completer.myNotNullInfos = ctx.notNullInfos
3304+ completer.setNotNullInfos( ctx.notNullInfos)
33053305 true
33063306 case _ =>
33073307 // If it has been completed, then it must be because there is a forward reference
You can’t perform that action at this time.
0 commit comments