From 10167c46191c1b02246635b01dcd3d1e0b75497a Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 12 Feb 2015 16:22:36 +0100 Subject: Check period validity once per run. --- src/dotty/tools/dotc/Run.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/dotty/tools/dotc/Run.scala') diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index abee30aab..a182029e6 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -13,6 +13,9 @@ import scala.reflect.io.VirtualFile class Run(comp: Compiler)(implicit ctx: Context) { + assert(comp.phases.last.last.id <= Periods.MaxPossiblePhaseId) + assert(ctx.runId <= Periods.MaxPossibleRunId) + var units: List[CompilationUnit] = _ def getSource(fileName: String): SourceFile = { -- cgit v1.2.3