aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-28 11:20:59 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-30 14:26:09 +0200
commit56195fcd64432078a5ddb5e7669614bb694f86aa (patch)
treee8c11d0eb6a09e495217756308833ea1c0816ac9 /src/dotty/tools/dotc/core/Denotations.scala
parent19c82207f5e42e10c48299658f3863bf1da4eb8b (diff)
downloaddotty-56195fcd64432078a5ddb5e7669614bb694f86aa.tar.gz
dotty-56195fcd64432078a5ddb5e7669614bb694f86aa.tar.bz2
dotty-56195fcd64432078a5ddb5e7669614bb694f86aa.zip
Fix bug in transformAfter: transform the last denotation in cycle.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala4
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
}
}