vfmt: fix formatting for `x, _ := f()`
parent
e23925f2be
commit
5ad957f270
|
@ -2868,15 +2868,12 @@ pub fn (mut c Checker) postfix_expr(mut node ast.PostfixExpr) table.Type {
|
|||
println(typ_sym.kind.str())
|
||||
c.error('invalid operation: $node.op.str() (non-numeric type `$typ_sym.name`)',
|
||||
node.pos)
|
||||
}
|
||||
//
|
||||
else {
|
||||
} else {
|
||||
node.auto_locked, _ = c.fail_if_immutable(node.expr)
|
||||
}
|
||||
if (typ.is_ptr() || typ_sym.is_pointer()) && !c.inside_unsafe {
|
||||
c.error('pointer arithmetic is only allowed in `unsafe` blocks', node.pos)
|
||||
}
|
||||
|
||||
return typ
|
||||
}
|
||||
|
||||
|
|
|
@ -258,12 +258,12 @@ pub fn (mut f Fmt) stmt(node ast.Stmt) {
|
|||
f.write(var_info.share.str() + ' ')
|
||||
}
|
||||
f.expr(left)
|
||||
if i < node.left.len - 1 {
|
||||
f.write(', ')
|
||||
}
|
||||
} else {
|
||||
f.expr(left)
|
||||
}
|
||||
if i < node.left.len - 1 {
|
||||
f.write(', ')
|
||||
}
|
||||
}
|
||||
f.is_assign = true
|
||||
f.write(' $node.op.str() ')
|
||||
|
|
Loading…
Reference in New Issue