node: fix issue with lvalue err ordering

This commit is contained in:
mappu 2020-04-08 19:58:56 +12:00
parent 760d1ddbbd
commit 51ca4ecd77
1 changed files with 1 additions and 1 deletions

View File

@ -1280,7 +1280,7 @@ func (this *conversionState) convertAssignment(n *assign.Assign, isTopLevelState
// we need to propagate errors
switch n.Expression.(type) {
case *expr.FunctionCall, *expr.StaticCall, *expr.New:
ret := "_, " + lvalue + " = " + rvalue + "\n"
ret := lvalue + ", err = " + rvalue + "\n"
ret += "if err != nil {\n"
ret += this.currentErrHandler
ret += "}\n"