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

Comprehension terms not being evaluated #453

Closed
tsandall opened this issue Sep 13, 2017 · 0 comments
Closed

Comprehension terms not being evaluated #453

tsandall opened this issue Sep 13, 2017 · 0 comments
Labels

Comments

@tsandall
Copy link
Member

topdown is not evaluating comprehension terms. As a result, references to vars in the comprehension escape the child context are evaluated in the outer query (resulting in errors, see below).

This can be solved relatively easily by rewriting comprehensions similar to rule heads.

$ opa run
OPA 0.5.8-dev (commit 8019c7e6, built at 2017-09-13T00:55:24Z)

Run 'help' to see a list of commands.

> vs = [[0], [1], [2]]
> [v[0] | v  = vs[_]]
storage_not_found_error: /0: document does not exist
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

1 participant