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

fmt: fix writing ConcatExpr (#6466)

This commit is contained in:
Nick Treleaven 2020-09-24 17:04:39 +01:00 committed by GitHub
parent dbce01792c
commit be2ac0ba89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -819,7 +819,7 @@ pub fn (mut f Fmt) expr(node ast.Expr) {
ast.ConcatExpr {
for i, val in node.vals {
if i != 0 {
f.write(' + ')
f.write(', ')
}
f.expr(val)
}

View File

@ -0,0 +1,3 @@
a, b := if true { 'a', 'b' } else { 'b', 'a' }
println(a)
println(b)