File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1186,11 +1186,11 @@ object Denotations {
11861186 * or a MissingRef or NoQualifyingRef instance, if it does not exist.
11871187 * if generateStubs is set, generates stubs for missing top-level symbols
11881188 */
1189- def staticRef (path : Name , generateStubs : Boolean = true )(implicit ctx : Context ): Denotation = {
1189+ def staticRef (path : Name , generateStubs : Boolean = true , isPackage : Boolean = false )(implicit ctx : Context ): Denotation = {
11901190 def select (prefix : Denotation , selector : Name ): Denotation = {
11911191 val owner = prefix.disambiguate(_.info.isParameterless)
11921192 if (owner.exists) {
1193- val result = owner.info.member(selector)
1193+ val result = if (isPackage) owner.info.decl(selector) else owner.info.member(selector)
11941194 if (result.exists) result
11951195 else {
11961196 val alt =
Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ trait Symbols { this: Context =>
357357// ----- Locating predefined symbols ----------------------------------------
358358
359359 def requiredPackage (path : PreName ): TermSymbol =
360- base.staticRef(path.toTermName).requiredSymbol(_ is Package ).asTerm
360+ base.staticRef(path.toTermName, isPackage = true ).requiredSymbol(_ is Package ).asTerm
361361
362362 def requiredPackageRef (path : PreName ): TermRef = requiredPackage(path).termRef
363363
You can’t perform that action at this time.
0 commit comments