microsoft / rego-cpp

A C++ interpreter for the OPA policy language Rego
https://microsoft.github.io/rego-cpp/
MIT License
33 stars 10 forks source link

Undefined values incorrectly raise arithmetic operations error #130

Closed anakrish closed 5 months ago

anakrish commented 8 months ago

Following rego

package example

x = 5 * y
y = input.a
z = 1

results in

errors:
---
error: Cannot perform arithmetic operations on non-numeric values
code: wellformed_error
(errorast
  (arg-seq
    (*)
    (scalar
      (INT 1:5))
    (var 14:data.example.y)))