In the case of a Go short definition (i.e. a, b := f()), the new defined variables must be (re-)created in order to preserve the previous value (if in a loop) which can be still in use in the context of a closure. This must not apply to redeclared variables which simply see their value reassigned.
The problem was both occuring in callBin() for runtime functions and assignFromCall() for functions created in the interpreter.
In the case of a Go short definition (i.e.
a, b := f()
), the new defined variables must be (re-)created in order to preserve the previous value (if in a loop) which can be still in use in the context of a closure. This must not apply to redeclared variables which simply see their value reassigned.The problem was both occuring in callBin() for runtime functions and assignFromCall() for functions created in the interpreter.
Fixes #1497.