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
Eta-expansion, via trailing underscore, of methods with no argument lists is now deprecated #8836
Conversation
175b73f
to
12a36b2
Compare
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.
Implementation LGTM, and I think this we can definitely ship in a 2.13 minor release.
Eta-expansion of nullary methods is dropped in Scala 3: https://dotty.epfl.ch/docs/reference/changed-features/eta-expansion.html So it must be deprecated in 2.13 first, and error under -Xsource:3.
12a36b2
to
c8a27c7
Compare
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.
LGTM. For the record, the restriction was added in scala/scala3@10ee00e.
@SethTisue wdyt about merging this in 2.13.2?
Note this will have an associated Scalafix rewrite. |
Let's do it. (I waffled some before answering — we've already asked people to test nightlies, so anything we merge at this point missed that boat, which makes me a bit nervous, even though this particular change doesn't seem risky. But then I thought: 2.13.2 is already a pretty big release for a minor release, and 2.13.1 was solid, so people can safely stay there a bit longer if they need to. So on the balance, we are on a somewhat risky road already, so I think we might as well pile on, and if it means we end up having to fast-track a 2.13.3 release, then so be it. We have to take the risks sometime, the changes have to go in some release.) |
Scalafix rewrite: lightbend-labs/scala-rewrites#15 |
Eta-expansion of nullary methods is dropped in Scala 3:
https://dotty.epfl.ch/docs/reference/changed-features/eta-expansion.html
So it must be deprecated in 2.13 first, and error under -Xsource:3.