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:
parent
6c7802d404
commit
bdfe5c1b11
@ -130,7 +130,7 @@ type BinaryOpExpr struct {
|
|||||||
|
|
||||||
func (e *BinaryOpExpr) walkChildNodes(w internalWalkFunc) {
|
func (e *BinaryOpExpr) walkChildNodes(w internalWalkFunc) {
|
||||||
e.LHS = w(e.LHS).(Expression)
|
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) {
|
func (e *BinaryOpExpr) Value(ctx *zcl.EvalContext) (cty.Value, zcl.Diagnostics) {
|
||||||
|
Loading…
Reference in New Issue
Block a user