@@ -88,14 +88,14 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
8888
8989 private var compiling = false
9090
91- private var myCtx = rootContext(using ictx)
91+ private var myCtx : Context | Null = rootContext(using ictx)
9292
9393 /** The context created for this run */
94- given runContext [Dummy_so_its_a_def ]: Context = myCtx
94+ given runContext [Dummy_so_its_a_def ]: Context = myCtx.nn
9595 assert(runContext.runId <= Periods .MaxPossibleRunId )
9696
97- private var myUnits : List [CompilationUnit ] = _
98- private var myUnitsCached : List [CompilationUnit ] = _
97+ private var myUnits : List [CompilationUnit ] = Nil
98+ private var myUnitsCached : List [CompilationUnit ] = Nil
9999 private var myFiles : Set [AbstractFile ] = _
100100
101101 // `@nowarn` annotations by source file, populated during typer
@@ -206,7 +206,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
206206 compileSources(sources)
207207 catch
208208 case NonFatal (ex) =>
209- if ! units.isInitialized then report.echo(i " exception occurred while compiling $units%, % " )
209+ if units != Nil then report.echo(i " exception occurred while compiling $units%, % " )
210210 else report.echo(s " exception occurred while compiling ${files.map(_.name).mkString(" , " )}" )
211211 throw ex
212212
@@ -367,8 +367,8 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
367367 override def reset (): Unit = {
368368 super [ImplicitRunInfo ].reset()
369369 super [ConstraintRunInfo ].reset()
370- myCtx = null . asInstanceOf
371- myUnits = null . asInstanceOf
372- myUnitsCached = null . asInstanceOf
370+ myCtx = null
371+ myUnits = Nil
372+ myUnitsCached = Nil
373373 }
374374}
0 commit comments