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

View File

@@ -791,10 +791,9 @@ impl Interpreter {
}
}
}
Value::Undefined | Value::Null => r = false,
// Other types cause every to evaluate to true even though
// it is supposed to happen only for empty domain.
_ => (),
_ => {
r = false;
}
};
self.contexts.pop();
self.scopes.pop();

View File

@@ -114,7 +114,6 @@ cases:
x1: 100
x2: 100
x3: 100
x4: 100
- note: negative
data: {}