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.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index c1b2e20eb..b00896117 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -231,6 +231,9 @@ object Contexts {
final def withPhase(phase: Phase): Context =
withPhase(phase.id)
+ final def withPhaseNoLater(phase: Phase) =
+ if (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`.
*/