1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: fix formatting array decomposition (#7835)

This commit is contained in:
Enzo
2021-01-03 16:19:43 +01:00
committed by GitHub
parent 9033099676
commit 22e54e6703
2 changed files with 9 additions and 0 deletions

View File

@@ -1140,6 +1140,7 @@ pub fn (mut f Fmt) expr(node ast.Expr) {
}
ast.ArrayDecompose {
f.expr(node.expr)
f.write('...')
}
}
}

View File

@@ -0,0 +1,8 @@
fn varargs(a ...int) {
println(a)
}
fn main() {
a := [1, 2, 3]
varargs(a...)
}