From 51ca4ecd7710f58edf399421b0e32fb297e78ba0 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 8 Apr 2020 19:58:56 +1200 Subject: [PATCH] node: fix issue with lvalue err ordering --- node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.go b/node.go index 743a85d..a88f698 100644 --- a/node.go +++ b/node.go @@ -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"