aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-09 13:35:17 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-09 19:01:00 +0100
commitf4e9a881a561e28900becc7deea520b43e57fb31 (patch)
tree04cda6a1f41717587fcb3ecb7c9e2a5cb59ac4ec /src/dotty/tools/dotc/typer/Typer.scala
parentada0febcb0893ff8f87d01f605a43f731e38a0be (diff)
downloaddotty-f4e9a881a561e28900becc7deea520b43e57fb31.tar.gz
dotty-f4e9a881a561e28900becc7deea520b43e57fb31.tar.bz2
dotty-f4e9a881a561e28900becc7deea520b43e57fb31.zip
WIP: Fixes to bring symbols forward
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala12
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`.