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

Var shadowing in comprehension contexts #146

Closed matajoh closed 5 months ago

matajoh commented 5 months ago
package compr_context

import future.keywords.in

output := a {
  a := {x: a |
    some x in [0, 1, 2]
    a = x * 2
  }
}

The result of data.compr_context.output=x should be:

{
  "x": {
    "0": 0,
    "1": 2,
    "2": 4
  }
}

But it is currently empty.