Closed
Description
Compiler version
3..4.1-RC2
Minimized code
Use -indent -rewrite
on following code:
@main
def main: Unit = {
object reactions {
def += (f: PartialFunction[String, Unit]) = ???
}
reactions += {
case a =>
case b =>
}
}
Output
@main
def main: Unit =
object reactions:
def += (f: PartialFunction[String, Unit]) = ???
reactions += :
case a =>
case b =>
Compiling this results in following error:
C:\Dev\Sandbox\src\main\scala\Main.scala:7:16
expression expected but : found
reactions += :
Expectation
The output of "-indent", "-rewrite" should compile without errors
Note
This pattern is common when using Scala Swing.