diff options
Diffstat (limited to 'test/dotty/partest/DPDirectCompiler.scala')
-rw-r--r-- | test/dotty/partest/DPDirectCompiler.scala | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/dotty/partest/DPDirectCompiler.scala b/test/dotty/partest/DPDirectCompiler.scala index 4e563820f..410dac338 100644 --- a/test/dotty/partest/DPDirectCompiler.scala +++ b/test/dotty/partest/DPDirectCompiler.scala @@ -13,20 +13,14 @@ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner) val clogWriter = new PrintWriter(clogFWriter, true) clogWriter.println("\ncompiling " + sources.mkString(" ") + "\noptions: " + opts0.mkString(" ")) - implicit val ctx: dotty.tools.dotc.core.Contexts.Context = { - val base = new dotty.tools.dotc.core.Contexts.ContextBase - base.initialCtx.fresh - } - try { val processor = if (opts0.exists(_.startsWith("#"))) dotty.tools.dotc.Bench else dotty.tools.dotc.Main val clogger = new ConsoleReporter(writer = clogWriter) - val logCtx = ctx.fresh.setTyperState(ctx.typerState.withReporter(clogger)) - val reporter = processor.process((sources.map(_.toString) ::: opts0).toArray, logCtx) + val reporter = processor.process((sources.map(_.toString) ::: opts0).toArray, clogger) if (!reporter.hasErrors) runner.genPass() else { - reporter.printSummary(ctx) + clogWriter.println(reporter.summary) runner.genFail(s"compilation failed with ${reporter.errorCount} errors") } } catch { |