Skip to content

Commit f67efbc

Browse files
committed
always evaluate right side of _ := foo()
fixup 9761f65
1 parent 8b58e25 commit f67efbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eval.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,9 @@ func (st *Runtime) executeLetList(set *SetNode) {
319319
}
320320
} else {
321321
for i := 0; i < len(set.Left); i++ {
322+
value := st.evalPrimaryExpressionGroup(set.Right[i])
322323
if set.Left[i].Type() != NodeUnderscore {
323-
st.variables[set.Left[i].(*IdentifierNode).Ident] = st.evalPrimaryExpressionGroup(set.Right[i])
324+
st.variables[set.Left[i].(*IdentifierNode).Ident] = value
324325
}
325326
}
326327
}

0 commit comments

Comments
 (0)