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

add parentheses for lambda param #569

Merged
merged 2 commits into from
May 31, 2021

Conversation

xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented May 30, 2021

Pull Request Checklist

  • Have you read through the contributor guidelines?
  • Have you signed the Typesafe CLA?
  • Have you squashed your commits?
  • Have you added copyright headers to new files?
  • Have you checked that both Scala and Java APIs are updated?
  • Have you updated the documentation for both Scala and Java sections?
  • Have you added tests for any changed functionality?

Fixes

Purpose

prepare Scala 3

scala> Option(1).map{ a => a }
val res0: Option[Int] = Some(1)

scala> Option(1).map{ a: Int => a }
1 |Option(1).map{ a: Int => a }
  |                      ^
  |parentheses are required around the parameter of a lambda
  |This construct can be rewritten automatically under -rewrite -source 3.0-migration.

Background Context

References

xuwei-k and others added 2 commits May 30, 2021 13:03
prepare Scala 3

```
scala> Option(1).map{ a => a }
val res0: Option[Int] = Some(1)

scala> Option(1).map{ a: Int => a }
1 |Option(1).map{ a: Int => a }
  |                      ^
  |parentheses are required around the parameter of a lambda
  |This construct can be rewritten automatically under -rewrite -source 3.0-migration.
```
@mkurz
Copy link
Member

mkurz commented May 31, 2021

Thanks! I hijacked your branch to fix travis, so the tests pass 😉

@mkurz mkurz merged commit 9071e55 into playframework:master May 31, 2021
@xuwei-k xuwei-k deleted the parentheses-lambda-param branch August 16, 2021 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants