fmt: fix formatting array decomposition (#7835)
parent
9033099676
commit
22e54e6703
|
@ -1140,6 +1140,7 @@ pub fn (mut f Fmt) expr(node ast.Expr) {
|
|||
}
|
||||
ast.ArrayDecompose {
|
||||
f.expr(node.expr)
|
||||
f.write('...')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fn varargs(a ...int) {
|
||||
println(a)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
a := [1, 2, 3]
|
||||
varargs(a...)
|
||||
}
|
Loading…
Reference in New Issue