From e7e1cdce8eb25452ed97e8a019cc63aaecab6fc6 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 31 Aug 2014 17:57:10 +0200 Subject: Avoid reloading NonMemberSyms. Non member symbols should not be reloaded in any case. --- src/dotty/tools/dotc/core/Types.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 1cd9c4af9..33a8d4be1 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1148,7 +1148,9 @@ object Types { val sym = lastSymbol if (sym == null) loadDenot else denotOfSym(sym) case d: SymDenotation => - if (d.validFor.runId == ctx.runId || ctx.stillValid(d)) d.current + if ( d.validFor.runId == ctx.runId + || ctx.stillValid(d) + || this.isInstanceOf[WithNonMemberSym]) d.current else { val newd = loadDenot if (newd.exists) newd else d.staleSymbolError @@ -1236,7 +1238,7 @@ object Types { else { // name has changed; try load in earlier phase and make current val d = loadDenot(ctx.withPhase(ctx.phaseId - 1)).current if (d.exists) d - else throw new Error(s"failure to reload $this") + else throw new Error(s"failure to reload $this of class $getClass") } } -- cgit v1.2.3