Skip to content

Activate rewrite for enclosing implicit parameter in parentheses for migration to 3.1 #9266

@adpi2

Description

@adpi2

The rule would replace { implicit x: T => <body> } by { implicit (x: T) => <body> } which is not supported by Scala 2. That explains why it has been neutralized in the code:

https://github.com/lampepfl/dotty/blob/6cbb458c95a406f1335272fc31c91e928893f8af/compiler/src/dotty/tools/dotc/parsing/Parsers.scala#L2163-L2177

However wouldn't it be possible to activate it for migration to 3.1?

As an argument in favor, I would point out that there is another rewrite for migration to 3.1 that is not supported by Scala 2 either:

https://github.com/lampepfl/dotty/blob/6cbb458c95a406f1335272fc31c91e928893f8af/compiler/src/dotty/tools/dotc/parsing/Parsers.scala#L1610-L1612

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions