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
To be consistent with the handling of other constructs that support trailing commas. In particular the case of a trailing-comma followed by -> is also seen with lambdas where it does prompt the insertion of a newline.
val whenWithTrailingComma =when (someEnum) {
A,
B, -> caseBody() // Trailing comma does not prevent the elision of any newlines.else->TODO("unhandled")
}
val lambdaWithTrailingComma =
{ a, b, // Trailing comma leads to newline insertion.->
body()
}
The text was updated successfully, but these errors were encountered:
To be consistent with the handling of other constructs that support trailing commas. In particular the case of a trailing-comma followed by
->
is also seen with lambdas where it does prompt the insertion of a newline.The text was updated successfully, but these errors were encountered: