File tree Expand file tree Collapse file tree 2 files changed +1
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import scala.util.control.NonFatal
2424/** A compiler run. Exports various methods to compile source files */
2525class Run (comp : Compiler )(implicit ctx : Context ) {
2626
27- assert(comp.phases.last.last.id <= Periods .MaxPossiblePhaseId )
2827 assert(ctx.runId <= Periods .MaxPossibleRunId )
2928
3029 var units : List [CompilationUnit ] = _
Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ object Phases {
348348 protected [Phases ] def init (base : ContextBase , start : Int , end: Int ): Unit = {
349349 if (start >= FirstPhaseId )
350350 assert(myPeriod == Periods .InvalidPeriod , s " phase $this has already been used once; cannot be reused " )
351+ assert(start <= Periods .MaxPossiblePhaseId , s " Too many phases, Period bits overflow " )
351352 myBase = base
352353 myPeriod = Period (NoRunId , start, end)
353354 myErasedTypes = prev.getClass == classOf [Erasure ] || prev.erasedTypes
You can’t perform that action at this time.
0 commit comments