-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #20146: attach the original name if there is an import selection for an indent #20163
Conversation
val termSelections = sels.flatMap(n => qual.tpe.member(n.name.toTermName).alternatives) | ||
val sameTermPath = qual.isTerm && sym.exists && sym.owner.isType && qual.tpe.typeSymbol == sym.owner.asType | ||
val selectionsToDealias = typeSelections ::: termSelections | ||
val renamedSelection = if sameTermPath then sels.find(sel => sel.imported.name == sym.name) else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no equivalent to this line in the new code. Why did it disappear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamedSelection
is removed. As its name suggests, it tries to find renamed selections. However, I think this logic is redundant, because it just compare the names from sels
with sym.name
and ensure the path is valid, which will be done in selector
later and has been ensured in typer.
Fix #20146
Attach the original name to the tree if there is an imported term selection for an indent.