mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
negation of an undefined value should return true (#21)
Signed-off-by: eric-therond <eric.therond.fr@gmail.com>
This commit is contained in:
+4
-1
@@ -760,7 +760,10 @@ impl<'source> Interpreter<'source> {
|
||||
value,
|
||||
collection,
|
||||
} => self.eval_some_in(span, key, value, collection, stmts)?,
|
||||
Literal::NotExpr { expr, .. } => matches!(self.eval_expr(expr)?, Value::Bool(false)),
|
||||
Literal::NotExpr { expr, .. } => {
|
||||
// https://github.com/open-policy-agent/opa/issues/1622#issuecomment-520547385
|
||||
matches!(self.eval_expr(expr)?, Value::Bool(false) | Value::Undefined)
|
||||
}
|
||||
Literal::Every {
|
||||
span,
|
||||
key,
|
||||
|
||||
Reference in New Issue
Block a user