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 {
1186
1186
* or a MissingRef or NoQualifyingRef instance, if it does not exist.
1187
1187
* if generateStubs is set, generates stubs for missing top-level symbols
1188
1188
*/
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 = {
1190
1190
def select (prefix : Denotation , selector : Name ): Denotation = {
1191
1191
val owner = prefix.disambiguate(_.info.isParameterless)
1192
1192
if (owner.exists) {
1193
- val result = owner.info.member(selector)
1193
+ val result = if (isPackage) owner.info.decl(selector) else owner.info.member(selector)
1194
1194
if (result.exists) result
1195
1195
else {
1196
1196
val alt =
Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ trait Symbols { this: Context =>
357
357
// ----- Locating predefined symbols ----------------------------------------
358
358
359
359
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
361
361
362
362
def requiredPackageRef (path : PreName ): TermRef = requiredPackage(path).termRef
363
363
You can’t perform that action at this time.
0 commit comments