diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 2a6a5017f..28a7f9e67 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1018,8 +1018,12 @@ object Types { case null => val sym = lastSymbol if (sym == null) loadDenot else denotOfSym(sym) - case d: SymDenotation if ctx.stillValid(d) => - d.current + case d: SymDenotation => + if (ctx.stillValid(d)) d.current + else { + val newd = loadDenot + if (newd.exists) newd else d.staleSymbolError + } case d => if (d.validFor.runId == ctx.period.runId) d.current else loadDenot |