From 56195fcd64432078a5ddb5e7669614bb694f86aa Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 28 Apr 2015 11:20:59 +0200 Subject: Fix bug in transformAfter: transform the last denotation in cycle. --- src/dotty/tools/dotc/core/Denotations.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index cbf5c6f09..6502c4a40 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -639,12 +639,14 @@ object Denotations { var current = symbol.current while (current.validFor.firstPhaseId < phase.id && (current.nextInRun.validFor.code > current.validFor.code)) current = current.nextInRun - while ((current.validFor.firstPhaseId >= phase.id) && (current.nextInRun.validFor.code > current.validFor.code)) { + var hasNext = true + while ((current.validFor.firstPhaseId >= phase.id) && hasNext) { val current1: SingleDenotation = f(current.asSymDenotation) if (current1 ne current) { current1.validFor = current.validFor current1.replaceDenotation(current) } + hasNext = current1.nextInRun.validFor.code > current1.validFor.code current = current1.nextInRun } } -- cgit v1.2.3