Skip to content

Commit 89b0815

Browse files
committed
Fix expansion of SuperRef
1 parent 3ea4894 commit 89b0815

File tree

12 files changed

+3
-3
lines changed

12 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ object Checking {
416416
case _: ThisRef | _: Fun | _: Warm | _: Cold =>
417417
Set(pot)
418418

419-
case _: SuperRef =>
420-
throw new Exception("Unexpected SuperRef")
419+
case SuperRef(pot1, supercls) =>
420+
expand(pot1).map { SuperRef(_, supercls)(pot.source) }
421421
}
422422
}
423423
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object Summarization {
3232

3333
case supert: Super =>
3434
val SuperType(thisTp, superTp) = supert.tpe.asInstanceOf[SuperType]
35-
val thisRef = ThisRef(thisTp.classSymbol.asClass)(supert)
35+
val thisRef = ThisRef(thisTp.widen.classSymbol.asClass)(supert)
3636
val pot = SuperRef(thisRef, superTp.classSymbol.asClass)(supert)
3737
Summary.empty + pot
3838

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)