Closed
Description
minimized code
Previously it was possible for me to write this code:
val foo: Int => Int = Some(7) match
case Some(y) => x => x + y
case None => identity[Int]
But as of this new release, this gives an "Expected start of definition" error unless either a) you add braces, or b) you add brackets:
val foo: Int => Int = Some(7) match
{
case Some(y) => x => x + y
case None => identity[Int]
}
val foo: Int => Int = Some(7) match
case Some(y) => (x => x + y)
case None => identity[Int]
It doesn't matter if the indentation is aligned with the match or not, just as long as indentation is in use.