diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index bbc134d7d..8edbec847 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -73,9 +73,15 @@ object Contexts { newctx } + def condensed: CondensedContext = base.initialCtx.fresh + .withPeriod(period) + .withPrinter(printer) + .withSettings(sstate) } - abstract class FreshContext extends Context { + abstract class CondensedContext extends Context + + abstract class FreshContext extends CondensedContext { def withPeriod(period: Period): this.type = { this.period = period; this } def withPhase(pid: PhaseId): this.type = withPeriod(Period(runId, pid)) def withConstraints(constraints: Constraints): this.type = { this.constraints = constraints; this } |