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

[backport] Allow case in pattern bindings even without -Xsource:3 #9740

Merged
merged 1 commit into from Aug 27, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Aug 27, 2021

This backports #9721 to Scala 2.12.

@scala-jenkins scala-jenkins added this to the 2.12.15 milestone Aug 27, 2021
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.

Should also remove test/files/neg/for-comprehension-case-future.check, LGTM otherwise

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Aug 27, 2021
@smarter smarter force-pushed the backport-case-without-future branch from ef01568 to 9be10ed Compare August 27, 2021 13:56
In scala#9558 (which shipped with 2.13.6) we added support for `case` bindings
under -Xsource:3. Since this parser change does not break any existing
code and since IntelliJ and scalameta/metals now understand this syntax
in Scala 2 code, it should be safe to enable it by default to further
ease cross-compilation between Scala 2 and 3.
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