You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following Dr. Martin Odersky’s suggestion, the proposal is that trailing commas are only supported in comma-separated elements that are enclosed by parentheses, square brackets or curly braces (), ], and }, respectively).
Is function bodies comma-separated elements?
reproduction steps
List(1, 2, 3).map {
a => a +1,
}
classA() {
println("a"),
}
defb() = {
println("b"),
}
newA()
b()