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
obj["a"] := input.a
obj["b"] := input.b
test_obj2 if {
{"a":"1"} == obj with input as {"a": "1"}
}
The code should be valid but gives the following compile error:
1 error occurred: policy.rego:32: rego_type_error: match error
left : object<a: string>
right : object<a: any, b: any>[string: any]
Steps To Reproduce
View play and click "Evaluate"
Expected behavior
I would expect this comparison to be valid since b may be undefined and not part of the object. Evaluating obj with input as {"a": "1"} reveals that it is in fact {"a":"1"}. As such there should be no compile error.
The text was updated successfully, but these errors were encountered:
Short description
Play: https://play.openpolicyagent.org/p/1qlgPwcNXA
Snippet:
The code should be valid but gives the following compile error:
Steps To Reproduce
View play and click "Evaluate"
Expected behavior
I would expect this comparison to be valid since b may be undefined and not part of the object. Evaluating obj with input as {"a": "1"} reveals that it is in fact
{"a":"1"}
. As such there should be no compile error.The text was updated successfully, but these errors were encountered: