diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index 036212b5f4..7fdf2357c0 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -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) } diff --git a/vlib/v/fmt/tests/assign_keep.vv b/vlib/v/fmt/tests/assign_keep.vv new file mode 100644 index 0000000000..230d3a8bd4 --- /dev/null +++ b/vlib/v/fmt/tests/assign_keep.vv @@ -0,0 +1,3 @@ +a, b := if true { 'a', 'b' } else { 'b', 'a' } +println(a) +println(b)