Skip to content

Commit 6c6070a

Browse files
committed
Replace lazy val with val
1 parent 8bc81ef commit 6c6070a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/CheckUnused.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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-
lazy val renamedSelection = if sameTermPath then sels.find(sel => sel.imported.name == sym.name) else None
666+
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 {

0 commit comments

Comments
 (0)