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 @@ -663,7 +663,7 @@ object CheckUnused:
663663 val termSelections = sels.flatMap(n => qual.tpe.member(n.name.toTermName).alternatives)
664664 val sameTermPath = qual.isTerm && sym.exists && sym.owner.isType && qual.tpe.typeSymbol == sym.owner.asType
665665 val selectionsToDealias = typeSelections ::: termSelections
666- def renamedSelection = if ( sameTermPath) then sels.find(sel => sel.imported.name == sym.name) else None
666+ lazy val renamedSelection = if sameTermPath then sels.find(sel => sel.imported.name == sym.name) else None
667667 val qualHasSymbol = simpleSelections.map(_.symbol).contains(sym) || (simpleSelections ::: selectionsToDealias).map(_.symbol).map(dealias).contains(dealiasedSym) || renamedSelection.isDefined
668668 def selector = sels.find(sel => (sel.name.toTermName == sym.name || sel.name.toTypeName == sym.name) && symName.map(n => n.toTermName == sel.rename).getOrElse(true ))
669669 def dealiasedSelector = if (isDerived) sels.flatMap(sel => selectionsToDealias.map(m => (sel, m.symbol))).collect {
You can’t perform that action at this time.
0 commit comments