microsoft / regorus

Regorus - A fast, lightweight Rego (OPA policy language) interpreter written in Rust.
MIT License
152 stars 34 forks source link

Undefined values in ordered else blocks lead to rule being undefined #302

Closed anakrish closed 2 months ago

anakrish commented 2 months ago

The following incorrectly evaluates x to Undefined instead of 2.

package test

import rego.v1

x := y if {
   true
} else := 2 if {
  true
}

y if false