Skip to content
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

Merged
merged 1 commit into from Mar 31, 2020

Conversation

dwijnand
Copy link
Member

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.

@scala-jenkins scala-jenkins added this to the 2.13.3 milestone Mar 27, 2020
Copy link
Member

@lrytz lrytz left a 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.
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Mar 30, 2020
Copy link
Member

@lrytz lrytz left a 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?

@dwijnand
Copy link
Member Author

Note this will have an associated Scalafix rewrite.

@SethTisue SethTisue modified the milestones: 2.13.3, 2.13.2 Mar 31, 2020
@SethTisue
Copy link
Member

SethTisue commented Mar 31, 2020

wdyt about merging this in 2.13.2?

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.)

@lrytz
Copy link
Member

lrytz commented Mar 31, 2020

Note this will have an associated Scalafix rewrite.

That would be nice! It would give us more experience about suggesting Scalafix for changes in minor releases, which will be more crucial when we do #8833 / #8846.

@lrytz lrytz merged commit bd83c84 into scala:2.13.x Mar 31, 2020
@dwijnand dwijnand deleted the fast-deprecate-prop-etax branch March 31, 2020 19:47
@dwijnand
Copy link
Member Author

dwijnand commented Apr 3, 2020

Scalafix rewrite: lightbend-labs/scala-rewrites#15

@SethTisue SethTisue changed the title Fast-track deprecating nullary method eta-expansion Eta-expansion, via trailing underscore, of methods with no argument lists is now deprecated Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
4 participants