Skip to content

Fix #9266: Offer rewrites for parentheses in implicit closures #9547

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

Merged
merged 5 commits into from
Aug 14, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 13, 2020

I don't have the time to write a proper test for this. I verified manually
that it does what it should:

-- Migration Warning: i9266.scala:3:23 -----------------------------------------
3 |def test = { implicit x: Int => x + x }
  |                       ^
  |This syntax is no longer supported; parameter needs to be enclosed in (...)
  |This construct can be rewritten automatically under -rewrite.
1 warning found

I don't have the time to write a proper test for this. I verified manually
that it does what it should:
```
-- Migration Warning: i9266.scala:3:23 -----------------------------------------
3 |def test = { implicit x: Int => x + x }
  |                       ^
  |This syntax is no longer supported; parameter needs to be enclosed in (...)
  |This construct can be rewritten automatically under -rewrite.
1 warning found
```
@odersky odersky added the fasttrack Simple fix. Reviewer should merge or apply additional changes directly. label Aug 13, 2020
@anatoliykmetyuk
Copy link
Contributor

I've modified the test to test the warning message.

@odersky
Copy link
Contributor Author

odersky commented Aug 14, 2020

The thing se could test is that -rewrite works as expected. But it's not a big deal either way.

@odersky odersky merged commit a92473b into scala:master Aug 14, 2020
@odersky odersky deleted the fix-#9266 branch August 14, 2020 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fasttrack Simple fix. Reviewer should merge or apply additional changes directly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants