@@ -18,7 +18,7 @@ import dotty.tools.dotc.core.StdNames._
1818import dotty .tools .dotc .core .Symbols .{Symbol , defn }
1919import dotty .tools .dotc .interactive .Completion
2020import dotty .tools .dotc .printing .SyntaxHighlighting
21- import dotty .tools .dotc .reporting .MessageRendering
21+ import dotty .tools .dotc .reporting .{ MessageRendering , StoreReporter }
2222import dotty .tools .dotc .reporting .{Message , Diagnostic }
2323import dotty .tools .dotc .util .Spans .Span
2424import dotty .tools .dotc .util .{SourceFile , SourcePosition }
@@ -174,8 +174,8 @@ class ReplDriver(settings: Array[String],
174174 }
175175 }
176176
177- private def newRun (state : State ) = {
178- val run = compiler.newRun(rootCtx.fresh.setReporter(newStoreReporter ), state)
177+ private def newRun (state : State , reporter : StoreReporter = newStoreReporter ) = {
178+ val run = compiler.newRun(rootCtx.fresh.setReporter(reporter ), state)
179179 state.copy(context = run.runContext)
180180 }
181181
@@ -243,7 +243,7 @@ class ReplDriver(settings: Array[String],
243243 unfusedPhases(using ctx).collectFirst { case phase : CollectTopLevelImports => phase.imports }.get
244244
245245 implicit val state = {
246- val state0 = newRun(istate)
246+ val state0 = newRun(istate, parsed.reporter )
247247 state0.copy(context = state0.context.withSource(parsed.source))
248248 }
249249 compiler
0 commit comments