Fix local bind body not being desugared

In Go `for i, val := range arr` creates a *copy*
so it was changing some temporary value.
This commit is contained in:
Stanisław Barzowski 2017-08-04 14:52:29 -04:00
parent f81573cb4e
commit fd77883a3f

View File

@ -302,8 +302,8 @@ func desugar(astPtr *astNode, objLevel int) (err error) {
return unimplErr return unimplErr
case *astLocal: case *astLocal:
for _, bind := range ast.binds { for i := range ast.binds {
err = desugar(&bind.body, objLevel) err = desugar(&ast.binds[i].body, objLevel)
if err != nil { if err != nil {
return return
} }