Skip to content

Commit 29976d7

Browse files
committed
Allow bringForward to "initial run"
A completer could need to complete a method in initial run. Bring forward should handle that case.
1 parent dd1d712 commit 29976d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,9 @@ object Denotations {
486486
*/
487487
private def bringForward()(implicit ctx: Context): SingleDenotation = this match {
488488
case denot: SymDenotation if ctx.stillValid(denot) =>
489-
if (denot.exists) assert(ctx.runId > validFor.runId, s"denotation $denot invalid in run ${ctx.runId}. ValidFor: $validFor")
489+
if (denot.exists)
490+
assert(ctx.runId > validFor.runId || ctx.runId == InitialRunId,
491+
s"denotation $denot invalid in run ${ctx.runId}. ValidFor: $validFor")
490492
var d: SingleDenotation = denot
491493
do {
492494
d.validFor = Period(ctx.period.runId, d.validFor.firstPhaseId, d.validFor.lastPhaseId)

0 commit comments

Comments
 (0)