Skip to content

Commit 7e3806e

Browse files
committed
Fix crash: SuperType.supertpe can be AndType
dotc -d out -Ycheck-init tests/pos/SI-4012-b.scala
1 parent 98002e7 commit 7e3806e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/init/Summarization.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ object Summarization {
3939
case supert: Super =>
4040
val SuperType(thisTp, superTp) = supert.tpe.asInstanceOf[SuperType]
4141
val thisRef = ThisRef(thisTp.widen.classSymbol.asClass)(supert)
42-
val pot = SuperRef(thisRef, superTp.classSymbol.asClass)(supert)
43-
Summary.empty + pot
42+
val pots = superTp.classSymbols.map { cls => SuperRef(thisRef, cls.asClass)(supert) }
43+
(pots.toSet, Effects.empty)
4444

4545
case Select(qualifier, name) =>
4646
val (pots, effs) = analyze(qualifier)

0 commit comments

Comments
 (0)