Allow user-defined zero-argument functions in Rego #6315
Open
Description
It's possible to declare functions with zero arguments in Rego:
package example
foo() := 1
these are however treated as regular rules, and there is no semantic difference between the above policy and:
package example
foo := 1
This is cause for confusion, as the user likely expects foo()
to behave as a function (e.g. not contribute to output document), but it will actually behave as a rule.
Alternatively, it should be a parser error to declare a zero-arg rule.
Metadata
Assignees
Type
Projects
Status
Nice To Have