aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdmund Noble <edmundnoble@gmail.com>2016-07-02 14:24:17 -0400
committerEdmund Noble <edmundnoble@gmail.com>2016-07-02 14:24:17 -0400
commit8a39160e8375dd1707f686e13a2a796aed310ef7 (patch)
treeef5e34ea733443ea2cebb4ad73b1824ed737df36 /src
parent07fd8a357ed660ef15163efb2788928fec290fdd (diff)
downloaddotty-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.scala3
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)
}