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

-source:3.4-migration -rewrite should remove empty argument list for class with only context bounds #21418

Closed
WojciechMazur opened this issue Aug 23, 2024 · 0 comments · Fixed by #21513
Assignees
Labels
area:rewriting tool good first issue Perfect for someone who wants to get started contributing itype:bug
Milestone

Comments

@WojciechMazur
Copy link
Contributor

Compiler version

All Scala 3+

Minimized code

trait Effect[F[_]]
class Countdown[F[_]: Effect]

@main def Test = new Countdown[Option]()(???)

Output

trait Effect[F[_]]
class Countdown[F[_]: Effect]

@main def Test = new Countdown[Option]()(using ???)
> scala-cli compile test.scala -S 3.5              
[error] ./test.scala:13:22
[error] Context bounds will map to context parameters.
[error] A `using` clause is needed to pass explicit arguments to them.
[error] This code can be rewritten automatically under -rewrite -source 3.4-migration.
[error] @main def Test = new Countdown[Option]()(using ???)

Expectation

The legacy (Scala 2) empty argument list should be removed when performing automatic rewrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rewriting tool good first issue Perfect for someone who wants to get started contributing itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants