You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== RUN Test_ResidualAst_Modified
filter_test.go:83: parsed ast: got expr: 123 == y, wanted x == y
filter_test.go:83: parsed ast: got expr: 123 == y, wanted x == y
filter_test.go:91: residual ast: got expr: 123 == y, wanted 456 == y
--- FAIL: Test_ResidualAst_Modified (0.00s)
Expected behavior ResidualAst should not be mutating it's input *Ast and should instead return a copy.
Additional context Either ResidualAst or interpreter.PruneAst should be making a copy of the expr that can then be safely mutated.
The text was updated successfully, but these errors were encountered:
Describe the bug
ResidualAst
mutates the input*Ast
which causes subsequent evaluations to fail or return incorrect results.To Reproduce
Check which components this affects:
Sample expression and input that reproduces the issue:
Test setup:
Expected behavior
ResidualAst
should not be mutating it's input*Ast
and should instead return a copy.Additional context
EitherResidualAst
orinterpreter.PruneAst
should be making a copy of the expr that can then be safely mutated.The text was updated successfully, but these errors were encountered: