aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Checking.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-04-04 21:21:48 +0200
committerGitHub <noreply@github.com>2017-04-04 21:21:48 +0200
commit586113dab51d95f2a606c83b2cd31563ac47a6cf (patch)
tree2f51e4b16b7d06b0a27173953046074e8a7f750a /compiler/src/dotty/tools/dotc/typer/Checking.scala
parent34afd70f55b2d6245b4840ea42fb4ca1845ee649 (diff)
parentbc269505221ac36e48ce64dcef2e1688d05d93c6 (diff)
downloaddotty-586113dab51d95f2a606c83b2cd31563ac47a6cf.tar.gz
dotty-586113dab51d95f2a606c83b2cd31563ac47a6cf.tar.bz2
dotty-586113dab51d95f2a606c83b2cd31563ac47a6cf.zip
Merge pull request #2190 from dotty-staging/fix-robust-avoidance
Make leak avoidance more robust
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Checking.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala
index 1dc35f507..148ccd6e3 100644
--- a/compiler/src/dotty/tools/dotc/typer/Checking.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -411,8 +411,14 @@ object Checking {
case tp: ClassInfo =>
tp.derivedClassInfo(
prefix = apply(tp.prefix),
- classParents = tp.parentsWithArgs.map(p =>
- apply(p).underlyingClassRef(refinementOK = false).asInstanceOf[TypeRef]))
+ classParents =
+ tp.parentsWithArgs.map { p =>
+ apply(p).underlyingClassRef(refinementOK = false) match {
+ case ref: TypeRef => ref
+ case _ => defn.ObjectType // can happen if class files are missing
+ }
+ }
+ )
case _ =>
mapOver(tp)
}