File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ object CheckUnused:
356
356
/** Given an import and accessibility, return an option of selector that match import<->symbol */
357
357
def isInImport (imp : tpd.Import , isAccessible : Boolean )(using Context ): Option [ImportSelector ] =
358
358
val tpd .Import (qual, sels) = imp
359
- val qualHasSymbol = qual.tpe.member(sym.name).symbol == sym
359
+ val qualHasSymbol = qual.tpe.member(sym.name).alternatives.map(_. symbol).contains( sym)
360
360
def selector = sels.find(sel => sel.name.toTermName == sym.name || sel.name.toTypeName == sym.name)
361
361
def wildcard = sels.find(sel => sel.isWildcard && ((sym.is(Given ) == sel.isGiven) || sym.is(Implicit )))
362
362
if qualHasSymbol && ! isAccessible && sym.exists then
You can’t perform that action at this time.
0 commit comments