ExplicitResultTypes
breaks compilation when using symbolic methods
#2166
Labels
ExplicitResultTypes
breaks compilation when using symbolic methods
#2166
Hi folks,
ExplicitResultTypes
doesn't seem to work correctly when the def/val uses symbols, as it inserts:
right next to the symbol, which fools the Scala parser. Adding a space before the:
should resolve the issue.I'm not sure if this is part of the known limitations mentionned in the documentation page, as I haven't found an issue describing the problem.
How to reproduce
Here is a minimal example, using Scala 3.5.2 and sbt 1.10.7.
src/main/scala/Main.scala
:build.sbt
:project/plugins.sbt
:.scalafix.conf
:Running
sbt scalafix
produces the following line:which fails to compile. The following version:
would compile correctly.
The text was updated successfully, but these errors were encountered: