-
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
Keep qualifier of Ident when selecting setter #18714
Conversation
5a1ed3b
to
c782372
Compare
@@ -1119,7 +1119,13 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer | |||
case Apply(fn, _) if fn.symbol.is(ExtensionMethod) => | |||
def toSetter(fn: Tree): untpd.Tree = fn match | |||
case fn @ Ident(name: TermName) => | |||
untpd.cpy.Ident(fn)(name.setterName) | |||
fn.tpe match |
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.
It looks non-sensical that on the one hand we can refer to a lhs with a simple ident, but on the other hand the setter needs a full tree expansion. Can you add a comment why that is so?
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.
Added a comment
c782372
to
b682f68
Compare
We already keep the qualifier as a typed splice if the prefix is an explicit Select. Fixes scala#18713
b682f68
to
789145c
Compare
Backports #18714 to the LTS branch. PR submitted by the release tooling. [skip ci]
We already keep the qualifier as a typed splice if the prefix is an explicit Select.
Fixes #18713