diff options
-rw-r--r-- | src/dotty/tools/dotc/FromTasty.scala | 2 | ||||
-rw-r--r-- | test/dotty/partest/DPDirectCompiler.scala | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/FromTasty.scala b/src/dotty/tools/dotc/FromTasty.scala index 1662d57e7..705deedd3 100644 --- a/src/dotty/tools/dotc/FromTasty.scala +++ b/src/dotty/tools/dotc/FromTasty.scala @@ -42,7 +42,7 @@ object FromTasty extends Driver { List(new ReadTastyTreesFromClasses) :: backendPhases } - override def newRun(implicit ctx: Context, reporter: Option[Reporter] = None): Run = { + override def newRun(implicit ctx: Context): Run = { reset() new TASTYRun(this)(rootContext) } diff --git a/test/dotty/partest/DPDirectCompiler.scala b/test/dotty/partest/DPDirectCompiler.scala index b04214893..885de8c62 100644 --- a/test/dotty/partest/DPDirectCompiler.scala +++ b/test/dotty/partest/DPDirectCompiler.scala @@ -23,9 +23,11 @@ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner) } try { - val processor = if (opts0.exists(_.startsWith("#"))) dotty.tools.dotc.Bench else dotty.tools.dotc.Main + val processor = + if (opts0.exists(_.startsWith("#"))) dotty.tools.dotc.Bench else dotty.tools.dotc.Main val clogger = new ConsoleReporter(writer = clogWriter)(ctx) - val reporter = processor.process((sources.map(_.toString) ::: opts0).toArray, ctx, Some(clogger)) + val logCtx = ctx.fresh.setTyperState(ctx.typerState.withReporter(clogger)) + val reporter = processor.process((sources.map(_.toString) ::: opts0).toArray, logCtx) if (!reporter.hasErrors) runner.genPass() else { reporter.printSummary(ctx) |