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
$ docker run -it --rm openpolicyagent/opa:0.10.7
OPA 0.10.7 (commit 0f39c27, built at 2019-04-09T00:29:33Z)
Run 'help' to see a list of commands.
>
>
> x := {"foo": 1}; x.bar == 1
1 error occurred: 1:18: rego_type_error: undefined ref: __local0__.bar
__local0__.bar
^
have: "bar"
want (one of): ["foo"]
In this case, the error refers to __local0__ because x is assigned with := and the compiler has rewritten the variable name.
The error should refer to x.
The text was updated successfully, but these errors were encountered:
Similar to 0b28390 this change updates the ref checker to unmangle
variables that are included in error messages.
Fixesopen-policy-agent#1430
Signed-off-by: Torin Sandall <[email protected]>
Similar to 0b28390 this change updates the ref checker to unmangle
variables that are included in error messages.
Fixes#1430
Signed-off-by: Torin Sandall <[email protected]>
For example:
In this case, the error refers to
__local0__
becausex
is assigned with:=
and the compiler has rewritten the variable name.The error should refer to
x
.The text was updated successfully, but these errors were encountered: