Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2515,9 +2515,12 @@ object SymDenotations {
multi.filterWithPredicate(_.symbol.associatedFile == chosen)
end dropStale

if symbol eq defn.ScalaPackageClass then
if name == nme.CONSTRUCTOR then
NoDenotation // packages don't have constructors, even if package objects do.
else if symbol eq defn.ScalaPackageClass then
// revert order: search package first, then nested package objects
val denots = super.computeMembersNamed(name)
if denots.exists || name == nme.CONSTRUCTOR then denots
if denots.exists then denots
else recur(packageObjs, NoDenotation)
else recur(packageObjs, NoDenotation)
end computeMembersNamed
Expand Down