diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-28 11:20:59 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-30 14:26:09 +0200 |
commit | 56195fcd64432078a5ddb5e7669614bb694f86aa (patch) | |
tree | e8c11d0eb6a09e495217756308833ea1c0816ac9 | |
parent | 19c82207f5e42e10c48299658f3863bf1da4eb8b (diff) | |
download | dotty-56195fcd64432078a5ddb5e7669614bb694f86aa.tar.gz dotty-56195fcd64432078a5ddb5e7669614bb694f86aa.tar.bz2 dotty-56195fcd64432078a5ddb5e7669614bb694f86aa.zip |
Fix bug in transformAfter: transform the last denotation in cycle.
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 4 |
1 files changed, 3 insertions, 1 deletions
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 } } |