diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index bd1aedd75..b35647ead 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -390,7 +390,6 @@ object Denotations { if ((symbol eq this.symbol) && (info eq this.info)) this else newLikeThis(symbol, info) - def orElse(that: => SingleDenotation) = if (this.exists) this else that def altsWith(p: Symbol => Boolean): List[SingleDenotation] = @@ -518,7 +517,8 @@ object Denotations { } else { // not found, cur points to highest existing variant var startPid = cur.validFor.lastPhaseId + 1 - val transformer = ctx.denotTransformers.nextTransformer(startPid) + val transformer = ctx.phases(startPid - 1).asInstanceOf[DenotTransformer] + //println(s"transforming with $transformer") next = transformer.transform(cur).syncWithParents if (next eq cur) startPid = cur.validFor.firstPhaseId @@ -527,20 +527,23 @@ object Denotations { case next: ClassDenotation => next.resetFlag(Frozen) case _ => } + next.nextInRun = cur.nextInRun cur.nextInRun = next cur = next } cur.validFor = Period( currentPeriod.runId, startPid, transformer.lastPhaseId) + //println(s"new denot: $cur, valid for ${cur.validFor}") } } else { - // currentPeriod < valid; in this case a version must exist + // currentPeriod < end of valid; in this case a version must exist // but to be defensive we check for infinite loop anyway var cnt = 0 while (!(cur.validFor contains currentPeriod)) { + //println(s"searching: $cur at $currentPeriod, valid for ${cur.validFor}") cur = cur.nextInRun cnt += 1 - assert(cnt <= MaxPossiblePhaseId, "seems to be a loop in Denotations") + assert(cnt <= MaxPossiblePhaseId, s"seems to be a loop in Denotations for $this, currentPeriod = $currentPeriod") } } cur |