Skip to content

Commit b5fae8f

Browse files
committed
Don't treat package object's <init> methods as package members
1 parent f56089b commit b5fae8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ object SymDenotations {
25152515
multi.filterWithPredicate(_.symbol.associatedFile == chosen)
25162516
end dropStale
25172517

2518-
if symbol eq defn.ScalaPackageClass then
2518+
if (symbol eq defn.ScalaPackageClass) || name == nme.CONSTRUCTOR then
25192519
val denots = super.computeMembersNamed(name)
25202520
if denots.exists || name == nme.CONSTRUCTOR then denots
25212521
else recur(packageObjs, NoDenotation)

0 commit comments

Comments
 (0)