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

Error if variable used both as array index and as dictionary key #153

Closed
timothyhinrichs opened this issue Nov 16, 2016 · 1 comment
Closed
Labels

Comments

@timothyhinrichs
Copy link
Member

Ran across the following error.

data.clair[layers][index].Name = data.docker.history[index][app].Id
storage error; bad path; object key must be a string, not 0

Presumably the problem is that 'index' is used for both an array and a dictionary.

@tsandall
Copy link
Member

The expected result would be an empty set--not an error.

tsandall added a commit to tsandall/opa that referenced this issue Nov 23, 2016
If refs have intersecting vars, the bindings produced by the index and the
evaluation of the non-indexed term may conflict. In this case, evaluation
should not continue as it means the variable did not unify.

Also, refactored check performed to determine if indexing can be used.

Fixes open-policy-agent#153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants