aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Contexts.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r--src/dotty/tools/dotc/core/Contexts.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index bbe8e920c..e1aeac8c3 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -248,7 +248,7 @@ object Contexts {
withPhase(phase.id)
final def withPhaseNoLater(phase: Phase) =
- if (ctx.phase.id > phase.id) withPhase(phase) else ctx
+ if (phase.exists && ctx.phase.id > phase.id) withPhase(phase) else ctx
/** If -Ydebug is on, the top of the stack trace where this context
* was created, otherwise `null`.