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
When a set contains no element, such as { x | x := input } with undefined input, value_dump will check the number of elements. It finds that the set has one element -- thus it's not printed as set(), but as { + elements dumped + }. When dumping elements, it only finds NULL elements (undefined), and thus doesn't print anything. In value dump's output, there's thus no way to differentiate empty sets from empty objects.
srenatus
changed the title
wasm: sets containing only undefined values aren't printed as set() in value_dump
wasm: sets and arrays containing undefined values behave differently from topdown
Oct 18, 2021
All data refs, and all dots after input, are covered, but naked input
refs could go unnoticed: their undefined state, undetected, would have
funny consequences in other places.
Fixesopen-policy-agent#3891.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
All data refs, and all dots after input, are covered, but naked input
refs could go unnoticed: their undefined state, undetected, would have
funny consequences in other places.
Fixes#3891.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
dolevf
pushed a commit
to dolevf/opa
that referenced
this issue
Nov 4, 2021
…nt#3892)
All data refs, and all dots after input, are covered, but naked input
refs could go unnoticed: their undefined state, undetected, would have
funny consequences in other places.
Fixesopen-policy-agent#3891.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
When a set contains no element, such as
{ x | x := input }
with undefined input,value_dump
will check the number of elements. It finds that the set has one element -- thus it's not printed asset()
, but as{
+ elements dumped +}
. When dumping elements, it only finds NULL elements (undefined), and thus doesn't print anything. In value dump's output, there's thus no way to differentiate empty sets from empty objects.This came up here 👉 #3868 (comment)
There's more! Extending the existing issue:
So, undefined elements in set or array literals don't make them overall undefined.
Set and array comprehensions disregard undefined in their conditions (it seems).
The text was updated successfully, but these errors were encountered: