Skip to content

Commit c1f4425

Browse files
committed
Fix bug in transformAfter: transform the last denotation in cycle.
1 parent 99f6fa5 commit c1f4425

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
@@ -637,12 +637,14 @@ object Denotations {
637637
var current = symbol.current
638638
while (current.validFor.firstPhaseId < phase.id && (current.nextInRun.validFor.code > current.validFor.code))
639639
current = current.nextInRun
640-
while ((current.validFor.firstPhaseId >= phase.id) && (current.nextInRun.validFor.code > current.validFor.code)) {
640+
var hasNext = true
641+
while ((current.validFor.firstPhaseId >= phase.id) && hasNext) {
641642
val current1: SingleDenotation = f(current.asSymDenotation)
642643
if (current1 ne current) {
643644
current1.validFor = current.validFor
644645
current1.replaceDenotation(current)
645646
}
647+
hasNext = current1.nextInRun.validFor.code > current1.validFor.code
646648
current = current1.nextInRun
647649
}
648650
}

0 commit comments

Comments
 (0)