Skip to content

Commit 586113d

Browse files
authored
Merge pull request #2190 from dotty-staging/fix-robust-avoidance
Make leak avoidance more robust
2 parents 34afd70 + bc26950 commit 586113d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,14 @@ object Checking {
411411
case tp: ClassInfo =>
412412
tp.derivedClassInfo(
413413
prefix = apply(tp.prefix),
414-
classParents = tp.parentsWithArgs.map(p =>
415-
apply(p).underlyingClassRef(refinementOK = false).asInstanceOf[TypeRef]))
414+
classParents =
415+
tp.parentsWithArgs.map { p =>
416+
apply(p).underlyingClassRef(refinementOK = false) match {
417+
case ref: TypeRef => ref
418+
case _ => defn.ObjectType // can happen if class files are missing
419+
}
420+
}
421+
)
416422
case _ =>
417423
mapOver(tp)
418424
}

0 commit comments

Comments
 (0)