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

Parse error when rule body is parsed as a set instead of a comprehension #307

Closed
anakrish opened this issue Aug 31, 2024 · 0 comments · Fixed by #309
Closed

Parse error when rule body is parsed as a set instead of a comprehension #307

anakrish opened this issue Aug 31, 2024 · 0 comments · Fixed by #309
Labels
bug Something isn't working opa compatibility parser

Comments

@anakrish
Copy link
Collaborator

import future.keywords

p if { 1 | [1,2][_] }

the rule body is parsed as a set resulting in

  |
5 | p if { 1 | [1,2][_] }
  |        ^
error: `union` expects set argument. Got `1` instead

It must be parsed as a comprehension instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working opa compatibility parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant