summaryrefslogtreecommitdiff
path: root/sources/scalac/Global.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac/Global.java')
-rw-r--r--sources/scalac/Global.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index 5c2249211b..a7b8f1e143 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -292,8 +292,13 @@ public class Global {
start();
currentPhase.apply(units);
stop(currentPhase.descriptor.taskDescription());
- if (currentPhase.descriptor.hasPrintFlag())
+ if (currentPhase.descriptor.hasPrintFlag()) {
+ // go to next phase to print symbols with their new type
+ boolean next = currentPhase.next != null;
+ if (next) currentPhase = currentPhase.next;
currentPhase.print(this);
+ if (next) currentPhase = currentPhase.prev;
+ }
if (currentPhase.descriptor.hasGraphFlag())
currentPhase.graph(this);
if (currentPhase.descriptor.hasCheckFlag())
@@ -322,8 +327,13 @@ public class Global {
start();
currentPhase.apply(new Unit[] {unit}); // !!! pb with Analyzer
stop(currentPhase.descriptor.taskDescription());
- if (currentPhase.descriptor.hasPrintFlag())
+ if (currentPhase.descriptor.hasPrintFlag()) {
+ // go to next phase to print symbols with their new type
+ boolean next = currentPhase.next != null;
+ if (next) currentPhase = currentPhase.next;
currentPhase.print(this);
+ if (next) currentPhase = currentPhase.prev;
+ }
if (currentPhase.descriptor.hasGraphFlag())
currentPhase.graph(this);
if (currentPhase.descriptor.hasCheckFlag())