aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-04-15 08:50:28 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-05-08 21:47:59 +0200
commit5700ca9d5b4710bcee5aac63c426efd8863e5339 (patch)
treee76ea232f6553496f712abc98a58a424a6fbe08b /src
parentc5c400c6f53e2d15fb311df63f87bb62e39c858c (diff)
downloaddotty-5700ca9d5b4710bcee5aac63c426efd8863e5339.tar.gz
dotty-5700ca9d5b4710bcee5aac63c426efd8863e5339.tar.bz2
dotty-5700ca9d5b4710bcee5aac63c426efd8863e5339.zip
Erasure of term refs without symbols
Need to allow for possibility that term ref does not have a symbol (e.g. termrefs with union prefixes do not always have symbols).
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/transform/Erasure.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/transform/Erasure.scala b/src/dotty/tools/dotc/core/transform/Erasure.scala
index 9fb580ae8..a7981b70f 100644
--- a/src/dotty/tools/dotc/core/transform/Erasure.scala
+++ b/src/dotty/tools/dotc/core/transform/Erasure.scala
@@ -124,7 +124,7 @@ class Erasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wildcard
else this(parent)
case tp: TermRef =>
val sym = tp.symbol
- if (sym.owner is Package) sym.termRef
+ if (sym.exists && (sym.owner is Package)) sym.termRef
else tp.derivedSelect(this(tp.prefix))
case _: ThisType | _: ConstantType =>
tp