From 2531498dc707824e64c8abd30a6aacffde84fa90 Mon Sep 17 00:00:00 2001 From: Katarzyna Marek Date: Fri, 29 Sep 2023 14:22:09 +0200 Subject: [PATCH] bugfix: add `moduleClass` imported symbols in `IndexedContext` --- .../src/main/dotty/tools/pc/IndexedContext.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/presentation-compiler/src/main/dotty/tools/pc/IndexedContext.scala b/presentation-compiler/src/main/dotty/tools/pc/IndexedContext.scala index 01456a367bba..03bc711e8f18 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/IndexedContext.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/IndexedContext.scala @@ -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.* @@ -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)