Skip to content

Commit 71fd92d

Browse files
szymon-rdWojciechMazur
authored andcommitted
Replace lazy val with val
[Cherry-picked 6c6070a]
1 parent f2fc101 commit 71fd92d

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
@@ -671,7 +671,7 @@ object CheckUnused:
671671
val termSelections = sels.flatMap(n => qual.tpe.member(n.name.toTermName).alternatives)
672672
val sameTermPath = qual.isTerm && sym.exists && sym.owner.isType && qual.tpe.typeSymbol == sym.owner.asType
673673
val selectionsToDealias = typeSelections ::: termSelections
674-
lazy val renamedSelection = if sameTermPath then sels.find(sel => sel.imported.name == sym.name) else None
674+
val renamedSelection = if sameTermPath then sels.find(sel => sel.imported.name == sym.name) else None
675675
val qualHasSymbol = simpleSelections.map(_.symbol).contains(sym) || (simpleSelections ::: selectionsToDealias).map(_.symbol).map(dealias).contains(dealiasedSym) || renamedSelection.isDefined
676676
def selector = sels.find(sel => (sel.name.toTermName == sym.name || sel.name.toTypeName == sym.name) && symName.map(n => n.toTermName == sel.rename).getOrElse(true))
677677
def dealiasedSelector = if(isDerived) sels.flatMap(sel => selectionsToDealias.map(m => (sel, m.symbol))).collect {

0 commit comments

Comments
 (0)