Skip to content

Commit 4a06182

Browse files
committed
Compiler: use the reporter passed from the Driver
With this commit and the previous one, partest should finally correctly log the output of the compiler and display it at the end of its execution if compilation failed.
1 parent 2a5171b commit 4a06182

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/dotty/tools/dotc/Compiler.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,13 @@ class Compiler {
111111
.setOwner(defn.RootClass)
112112
.setTyper(new Typer)
113113
.setMode(Mode.ImplicitsEnabled)
114-
.setTyperState(new MutableTyperState(ctx.typerState, rootReporter(ctx), isCommittable = true))
114+
.setTyperState(new MutableTyperState(ctx.typerState, ctx.typerState.reporter, isCommittable = true))
115115
ctx.definitions.init(start) // set context of definitions to start
116116
def addImport(ctx: Context, refFn: () => TermRef) =
117117
ctx.fresh.setImportInfo(ImportInfo.rootImport(refFn)(ctx))
118118
(start.setRunInfo(new RunInfo(start)) /: defn.RootImportFns)(addImport)
119119
}
120120

121-
protected def rootReporter(implicit ctx: Context): Reporter = new ConsoleReporter()
122-
123121
def reset()(implicit ctx: Context): Unit = {
124122
ctx.base.reset()
125123
ctx.runInfo.clear()

0 commit comments

Comments
 (0)