diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Checking.scala | 10 |
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) } |