Skip to content

Commit

Permalink
always evaluate right side of _ := foo()
Browse files Browse the repository at this point in the history
fixup 9761f65
  • Loading branch information
sauerbraten committed Aug 12, 2020
1 parent 8b58e25 commit f67efbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,9 @@ func (st *Runtime) executeLetList(set *SetNode) {
}
} else {
for i := 0; i < len(set.Left); i++ {
value := st.evalPrimaryExpressionGroup(set.Right[i])
if set.Left[i].Type() != NodeUnderscore {
st.variables[set.Left[i].(*IdentifierNode).Ident] = st.evalPrimaryExpressionGroup(set.Right[i])
st.variables[set.Left[i].(*IdentifierNode).Ident] = value
}
}
}
Expand Down

0 comments on commit f67efbc

Please sign in to comment.