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:
parent
dbce01792c
commit
be2ac0ba89
@ -819,7 +819,7 @@ pub fn (mut f Fmt) expr(node ast.Expr) {
|
|||||||
ast.ConcatExpr {
|
ast.ConcatExpr {
|
||||||
for i, val in node.vals {
|
for i, val in node.vals {
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
f.write(' + ')
|
f.write(', ')
|
||||||
}
|
}
|
||||||
f.expr(val)
|
f.expr(val)
|
||||||
}
|
}
|
||||||
|
3
vlib/v/fmt/tests/assign_keep.vv
Normal file
3
vlib/v/fmt/tests/assign_keep.vv
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
a, b := if true { 'a', 'b' } else { 'b', 'a' }
|
||||||
|
println(a)
|
||||||
|
println(b)
|
Loading…
x
Reference in New Issue
Block a user