Skip to content

Error message mentions -rewrite but rewrites also requires -source 3.0-migration #10692

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

Closed
tpolecat opened this issue Dec 7, 2020 · 1 comment · Fixed by #10701
Closed

Error message mentions -rewrite but rewrites also requires -source 3.0-migration #10692

tpolecat opened this issue Dec 7, 2020 · 1 comment · Fixed by #10701

Comments

@tpolecat
Copy link

tpolecat commented Dec 7, 2020

I am getting messages about code that can be "rewritten automatically under -rewrite", such as the following:

[error] -- Error: /Users/rnorris/Scala/atto/modules/fs2/src/test/scala/atto/fs2/PipesTest.scala:14:86 
[error] 14 |  property("parse1 parses single value correctly") = forAll(Gen.posNum[Int]) { i: Int =>
[error]    |                                                                                      ^
[error]    |           parentheses are required around the parameter of a lambda
[error]    |           This construct can be rewritten automatically under -rewrite.

but adding -rewrite to my scalacOptions in sbt has no effect.

@smarter
Copy link
Member

smarter commented Dec 7, 2020

Just tried it and it works with -source 3.0-migration -rewrite.

@smarter smarter changed the title how does -rewrite work? Error message mentions -rewrite but rewrites also requires -source 3.0-migration Dec 7, 2020
@liufengyun liufengyun linked a pull request Dec 8, 2020 that will close this issue
liufengyun added a commit to dotty-staging/dotty that referenced this issue Jan 6, 2021
liufengyun added a commit to dotty-staging/dotty that referenced this issue Jan 6, 2021
liufengyun added a commit to dotty-staging/dotty that referenced this issue Jan 6, 2021
liufengyun added a commit that referenced this issue Jan 6, 2021
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants