Skip to content

Commit f5d88a3

Browse files
committed
Adapt sourceModule to new selfInfo scheme.
1 parent 6c0d40d commit f5d88a3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,11 @@ object SymDenotations {
736736

737737
/** The module implemented by this module class, NoSymbol if not applicable. */
738738
final def sourceModule(implicit ctx: Context): Symbol = myInfo match {
739-
case ClassInfo(_, _, _, _, selfType: TermRef) if this is ModuleClass =>
740-
selfType.symbol
739+
case ClassInfo(_, _, _, _, selfType) if this is ModuleClass =>
740+
selfType match {
741+
case selfType: TermRef => selfType.symbol
742+
case selfType: Symbol => selfType.info.asInstanceOf[TermRef].symbol
743+
}
741744
case info: LazyType =>
742745
info.sourceModule
743746
case _ =>

0 commit comments

Comments
 (0)