@@ -88,14 +88,14 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
88
88
89
89
private var compiling = false
90
90
91
- private var myCtx = rootContext(using ictx)
91
+ private var myCtx : Context | Null = rootContext(using ictx)
92
92
93
93
/** 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
95
95
assert(runContext.runId <= Periods .MaxPossibleRunId )
96
96
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
99
99
private var myFiles : Set [AbstractFile ] = _
100
100
101
101
// `@nowarn` annotations by source file, populated during typer
@@ -206,7 +206,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
206
206
compileSources(sources)
207
207
catch
208
208
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%, % " )
210
210
else report.echo(s " exception occurred while compiling ${files.map(_.name).mkString(" , " )}" )
211
211
throw ex
212
212
@@ -367,8 +367,8 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
367
367
override def reset (): Unit = {
368
368
super [ImplicitRunInfo ].reset()
369
369
super [ConstraintRunInfo ].reset()
370
- myCtx = null . asInstanceOf
371
- myUnits = null . asInstanceOf
372
- myUnitsCached = null . asInstanceOf
370
+ myCtx = null
371
+ myUnits = Nil
372
+ myUnitsCached = Nil
373
373
}
374
374
}
0 commit comments