diff options
author | Edmund Noble <edmundnoble@gmail.com> | 2016-07-02 14:24:17 -0400 |
---|---|---|
committer | Edmund Noble <edmundnoble@gmail.com> | 2016-07-02 14:24:17 -0400 |
commit | 8a39160e8375dd1707f686e13a2a796aed310ef7 (patch) | |
tree | ef5e34ea733443ea2cebb4ad73b1824ed737df36 /src | |
parent | 07fd8a357ed660ef15163efb2788928fec290fdd (diff) | |
download | dotty-8a39160e8375dd1707f686e13a2a796aed310ef7.tar.gz dotty-8a39160e8375dd1707f686e13a2a796aed310ef7.tar.bz2 dotty-8a39160e8375dd1707f686e13a2a796aed310ef7.zip |
Implement -print as -Xprint:(last phase)
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index 928a59214..f2596e929 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -62,7 +62,8 @@ class Run(comp: Compiler)(implicit ctx: Context) { units = phase.runOn(units) def foreachUnit(op: Context => Unit)(implicit ctx: Context): Unit = for (unit <- units) op(ctx.fresh.setPhase(phase.next).setCompilationUnit(unit)) - if (ctx.settings.Xprint.value.containsPhase(phase)) + if (ctx.settings.Xprint.value.containsPhase(phase) || + (ctx.settings.print.value && phase == ctx.allPhases.last)) foreachUnit(printTree) ctx.informTime(s"$phase ", start) } |