diff options
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index f48dfa09b..bce9d225a 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -65,10 +65,14 @@ class Typer extends Namer with Applications with Implicits { /** A denotation exists really if it exists and does not point to a stale symbol. */ def reallyExists(denot: Denotation)(implicit ctx: Context): Boolean = - denot.exists && { - val sym = denot.symbol - sym.ensureCompleted - (sym eq NoSymbol) || !sym.isAbsent + try + denot.exists && { + val sym = denot.symbol + sym.ensureCompleted + (sym eq NoSymbol) || !sym.isAbsent + } + catch { + case ex: StaleSymbol => false } /** The type of a selection with `name` of a tree with type `site`. |