Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unify to return undos in all cases #437

Merged
merged 2 commits into from
Aug 30, 2017

Conversation

tsandall
Copy link
Member

The evalEqUnify implementation was not returning undo objects in cases
where it should: if unification failed after binding a var, the binding
was not undone and backtracking would proceed with an incorrect binding.
For this to manifest, a query would likely be iterating and performing
pattern matching on a composite value.

Fixes #436

- Remove cases that do not test topdown
- Remove need for second branch in low-level assertion helper
The evalEqUnify implementation was not returning undo objects in cases
where it should: if unification failed after binding a var, the binding
was not undone and backtracking would proceed with an incorrect binding.
For this to manifest, a query would likely be iterating and performing
pattern matching on a composite value.

Fixes open-policy-agent#436
@tsandall tsandall merged commit e058634 into open-policy-agent:master Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant