From bdfe5c1b11a192549f582566f34a9af4812071f7 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Wed, 14 Jun 2017 07:29:37 -0700 Subject: [PATCH] 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. --- zcl/zclsyntax/expression_ops.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcl/zclsyntax/expression_ops.go b/zcl/zclsyntax/expression_ops.go index 06ddaa9..60c156c 100644 --- a/zcl/zclsyntax/expression_ops.go +++ b/zcl/zclsyntax/expression_ops.go @@ -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) {