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
In some circumstances, use of keywords on the left hand side of comprehensions can cause the error message to be unexpected identifier token: non-terminated object rather than unexpected ___ keyword. Although OPA is correct to throw an error in this situation, it makes the problem much harder to debug.
All of the above examples should have emitted rego_parse_error: unexpected as keyword errors, and pointed to the as, not to the bt, which is an allowed variable name.
Additional context
$ uname -a
Linux eos 6.6.10-76060610-generic #202401051437~1709085277~22.04~31d73d8 SMP PREEMPT_DYNAMIC Wed F x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Pop
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Pop!_OS 22.04 LTS"
$ opa version
Version: 0.63.0
Build Commit: bb30b153692aa77738b982e29424c8b24a1ad14a
Build Timestamp: 2024-03-28T15:50:15Z
Build Hostname:
Go Version: go1.22.2
Platform: linux/amd64
WebAssembly: unavailable
The text was updated successfully, but these errors were encountered:
Short description
In some circumstances, use of keywords on the left hand side of comprehensions can cause the error message to be
unexpected identifier token: non-terminated object
rather thanunexpected ___ keyword
. Although OPA is correct to throw an error in this situation, it makes the problem much harder to debug.Steps To Reproduce
Expected behavior
All of the above examples should have emitted
rego_parse_error: unexpected as keyword
errors, and pointed to theas
, not to thebt
, which is an allowed variable name.Additional context
The text was updated successfully, but these errors were encountered: