We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f56089b commit 63ff0c6Copy full SHA for 63ff0c6
compiler/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -2515,9 +2515,12 @@ object SymDenotations {
2515
multi.filterWithPredicate(_.symbol.associatedFile == chosen)
2516
end dropStale
2517
2518
- if symbol eq defn.ScalaPackageClass then
+ if name == nme.CONSTRUCTOR then
2519
+ NoDenotation // packages don't have constructors, even if package objects do.
2520
+ else if symbol eq defn.ScalaPackageClass then
2521
+ // revert order: search package first, then nested package objects
2522
val denots = super.computeMembersNamed(name)
- if denots.exists || name == nme.CONSTRUCTOR then denots
2523
+ if denots.exists then denots
2524
else recur(packageObjs, NoDenotation)
2525
2526
end computeMembersNamed
0 commit comments