Skip to content

Commit ac7f470

Browse files
committed
Fix bug in transformAfter: transform the last denotation in cycle.
1 parent af680d4 commit ac7f470

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
@@ -639,12 +639,14 @@ object Denotations {
639639
var current = symbol.current
640640
while (current.validFor.firstPhaseId < phase.id && (current.nextInRun.validFor.code > current.validFor.code))
641641
current = current.nextInRun
642-
while ((current.validFor.firstPhaseId >= phase.id) && (current.nextInRun.validFor.code > current.validFor.code)) {
642+
var hasNext = true
643+
while ((current.validFor.firstPhaseId >= phase.id) && hasNext) {
643644
val current1: SingleDenotation = f(current.asSymDenotation)
644645
if (current1 ne current) {
645646
current1.validFor = current.validFor
646647
current1.replaceDenotation(current)
647648
}
649+
hasNext = current1.nextInRun.validFor.code > current1.validFor.code
648650
current = current1.nextInRun
649651
}
650652
}

0 commit comments

Comments
 (0)