Skip to content

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

Closed
@WojciechMazur

Description

@WojciechMazur

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions