File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -220,8 +220,10 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
220
220
val found =
221
221
if (isSelfDenot(defDenot)) curOwner.enclosingClass.thisType
222
222
else curOwner.thisType.select(name, defDenot)
223
- if (! (curOwner is Package ) || (defDenot.symbol is Package ) || isDefinedInCurrentUnit(defDenot))
223
+ if (! (curOwner is Package ) || isDefinedInCurrentUnit(defDenot))
224
224
return checkNewOrShadowed(found, definition) // no need to go further out, we found highest prec entry
225
+ else if (defDenot.symbol is Package )
226
+ return checkNewOrShadowed(previous orElse found, packageClause)
225
227
else if (prevPrec < packageClause)
226
228
return findRef(found, packageClause, ctx)(outer)
227
229
}
You can’t perform that action at this time.
0 commit comments