Skip to content

Commit

Permalink
bugfix: add moduleClass imported symbols in IndexedContext
Browse files Browse the repository at this point in the history
[Cherry-picked 2531498]
  • Loading branch information
kasiaMarek authored and WojciechMazur committed Jun 19, 2024
1 parent 530c892 commit 0b7d1e9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import scala.util.control.NonFatal

import dotty.tools.dotc.core.Contexts.*
import dotty.tools.dotc.core.Flags.*
import dotty.tools.dotc.core.NameOps.moduleClassName
import dotty.tools.dotc.core.Names.*
import dotty.tools.dotc.core.Symbols.*
import dotty.tools.dotc.core.Types.*
Expand Down Expand Up @@ -170,7 +171,11 @@ object IndexedContext:
initial ++ fromPackageObjects

def fromImport(site: Type, name: Name)(using Context): List[Symbol] =
List(site.member(name.toTypeName), site.member(name.toTermName))
List(
site.member(name.toTypeName),
site.member(name.toTermName),
site.member(name.moduleClassName),
)
.flatMap(_.alternatives)
.map(_.symbol)

Expand Down

0 comments on commit 0b7d1e9

Please sign in to comment.