Closed
Description
Compiler version
3.0.0-RC1
Minimized code
given scala.util.CommandLineParser.FromString[MyEnum] with {
def fromString(s: String): MyEnum = MyEnum.valueOf(s)
}
Output
given scala.util.CommandLineParser.FromString[MyEnum] with:
def fromString(s: String): MyEnum = MyEnum.valueOf(s)
Which then fails to compile with:
[error] -- [E040] Syntax Error: ...src/main/scala/Main.scala:7:61
[error] 7 |given scala.util.CommandLineParser.FromString[MyEnum] with:
[error] | ^
[error] | an identifier expected, but ':' found
Expectation
Rewrite should produce valid code