zclsyntax: visit both LHS and RHS of binary op in walk

Due to a typo, it was previously visiting LHS twice, and destroying the
RHS by overwriting it by LHS.
This commit is contained in:
Martin Atkins 2017-06-14 07:29:37 -07:00
parent 6c7802d404
commit bdfe5c1b11

View File

@ -130,7 +130,7 @@ type BinaryOpExpr struct {
func (e *BinaryOpExpr) walkChildNodes(w internalWalkFunc) {
e.LHS = w(e.LHS).(Expression)
e.RHS = w(e.LHS).(Expression)
e.RHS = w(e.RHS).(Expression)
}
func (e *BinaryOpExpr) Value(ctx *zcl.EvalContext) (cty.Value, zcl.Diagnostics) {