aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-18 12:56:17 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-18 12:56:29 +0100
commita0d6eedeb64d45af53a3cb93ab48b22855e3a61c (patch)
treed511e09557cc91b90c7da76b124647a5c0bdca30 /src/dotty/tools/dotc/typer/Typer.scala
parentcb3adb9ff93c45101150dd71b927295e327b3c81 (diff)
downloaddotty-a0d6eedeb64d45af53a3cb93ab48b22855e3a61c.tar.gz
dotty-a0d6eedeb64d45af53a3cb93ab48b22855e3a61c.tar.bz2
dotty-a0d6eedeb64d45af53a3cb93ab48b22855e3a61c.zip
Fixing problems around isAbsent
A Symbol is absent if (1) it equals NoSymbol, or (2) it's type is NoType or (3) it is a module with an module class which is absent. Note that isAbsent does not force symbols. The info has to be completed explicitly to check. Criterion (3) is missing, we now take it into account. Also, made ClassDenotation ops more robost in tge face of possibilty of being absent. Finally, refined logic in Typer, to complete a symbol before checking absent.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index d16ec53ae..31964ce98 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -67,6 +67,7 @@ class Typer extends Namer with Applications with Implicits {
def reallyExists(denot: Denotation)(implicit ctx: Context): Boolean =
denot.exists && {
val sym = denot.symbol
+ sym.ensureCompleted
(sym eq NoSymbol) || !sym.isAbsent
}