File tree 2 files changed +1
-1
lines changed
compiler/src/dotty/tools/dotc
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
24
24
/** A compiler run. Exports various methods to compile source files */
25
25
class Run (comp : Compiler )(implicit ctx : Context ) {
26
26
27
- assert(comp.phases.last.last.id <= Periods .MaxPossiblePhaseId )
28
27
assert(ctx.runId <= Periods .MaxPossibleRunId )
29
28
30
29
var units : List [CompilationUnit ] = _
Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ object Phases {
348
348
protected [Phases ] def init (base : ContextBase , start : Int , end: Int ): Unit = {
349
349
if (start >= FirstPhaseId )
350
350
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 " )
351
352
myBase = base
352
353
myPeriod = Period (NoRunId , start, end)
353
354
myErasedTypes = prev.getClass == classOf [Erasure ] || prev.erasedTypes
You can’t perform that action at this time.
0 commit comments