every: non collections should evaluate to false (#253)

See https://github.com/open-policy-agent/opa/pull/6763

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2024-05-28 09:25:13 -04:00
committed by GitHub
parent 2b82f2842f
commit ff0adf054e
2 changed files with 3 additions and 5 deletions
+3 -4
View File
@@ -791,10 +791,9 @@ impl Interpreter {
} }
} }
} }
Value::Undefined | Value::Null => r = false, _ => {
// Other types cause every to evaluate to true even though r = false;
// it is supposed to happen only for empty domain. }
_ => (),
}; };
self.contexts.pop(); self.contexts.pop();
self.scopes.pop(); self.scopes.pop();
-1
View File
@@ -114,7 +114,6 @@ cases:
x1: 100 x1: 100
x2: 100 x2: 100
x3: 100 x3: 100
x4: 100
- note: negative - note: negative
data: {} data: {}