We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4532c71 + a437a82 commit b4d0cd4Copy full SHA for b4d0cd4
compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -1328,8 +1328,9 @@ class Namer { typer: Typer =>
1328
*/
1329
def moduleValSig(sym: Symbol)(using Context): Type = {
1330
val clsName = sym.name.moduleClassName
1331
- val cls = ctx.denotNamed(clsName).suchThat(_.is(ModuleClass))
1332
- .orElse(newStubSymbol(ctx.owner, clsName).assertingErrorsReported)
+ val cls = ctx.effectiveScope.lookupAll(clsName)
+ .find(_.is(ModuleClass))
1333
+ .getOrElse(newStubSymbol(ctx.owner, clsName).assertingErrorsReported)
1334
ctx.owner.thisType.select(clsName, cls)
1335
}
1336
tests/pos/i11141.scala
@@ -0,0 +1,5 @@
1
+package p
2
+export X._
3
+
4
+object X:
5
+ val A = 42
0 commit comments