diff options
author | vsalvis <salvisbergvera@gmail.com> | 2015-06-24 16:33:44 +0200 |
---|---|---|
committer | vsalvis <salvisbergvera@gmail.com> | 2015-06-24 16:33:44 +0200 |
commit | 5e4e0cf35036906423e13eb74093af07a29f0521 (patch) | |
tree | b1ef6a79ed93ae78be5711532c55a1976f8182d2 /src/dotty/tools/dotc/Run.scala | |
parent | 919f5b2e5c5a091326a0693db49ac30ca1e6bf0f (diff) | |
download | dotty-5e4e0cf35036906423e13eb74093af07a29f0521.tar.gz dotty-5e4e0cf35036906423e13eb74093af07a29f0521.tar.bz2 dotty-5e4e0cf35036906423e13eb74093af07a29f0521.zip |
Partest 2/3: Compiler prints via context instead of println
Diffstat (limited to 'src/dotty/tools/dotc/Run.scala')
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index 401608a73..553805d95 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -33,7 +33,7 @@ class Run(comp: Compiler)(implicit ctx: Context) { compileSources(sources) } catch { case NonFatal(ex) => - println(i"exception occurred while compiling $units%, %") + ctx.println(i"exception occurred while compiling $units%, %") throw ex } @@ -55,7 +55,7 @@ class Run(comp: Compiler)(implicit ctx: Context) { ctx.usePhases(phases) for (phase <- ctx.allPhases) if (!ctx.reporter.hasErrors) { - if (ctx.settings.verbose.value) println(s"[$phase]") + if (ctx.settings.verbose.value) ctx.println(s"[$phase]") units = phase.runOn(units) def foreachUnit(op: Context => Unit)(implicit ctx: Context): Unit = for (unit <- units) op(ctx.fresh.setPhase(phase.next).setCompilationUnit(unit)) @@ -69,8 +69,8 @@ class Run(comp: Compiler)(implicit ctx: Context) { val prevPhase = ctx.phase.prev // can be a mini-phase val squashedPhase = ctx.squashed(prevPhase) - println(s"result of $unit after ${squashedPhase}:") - println(unit.tpdTree.show(ctx)) + ctx.println(s"result of $unit after ${squashedPhase}:") + ctx.println(unit.tpdTree.show(ctx)) } def compile(sourceCode: String): Unit = { |