// *** before: ***
fun sumOld(
a: Int,
b: Int,
c: Int // a comma here was an error
) = a + b + c
val listOld = listOf(
"one",
"two" // and here too
)
// *** in version 1.4: ***
fun sum(
a: Int,
b: Int,
c: Int, // the trailing comma is allowed
) = a + b + c
val list = listOf(
"one",
"two",
)
enum class Color {
RED,
GREEN,
BLUE,
}
fun main() {
val (x, y,) = 1 to 2
println(sum(1, 2, 3,))
println("$list $x $y ${Color.RED}")
}