Closed
Description
Affected version: 1.16+ (v1.15 works fine).
I'm getting a strange issue while trying to use logical operation against array functions. v1.16
has this issue, v1.15
works fine.
Here is a simple snippet:
type tag struct {
Name string
}
type item struct {
Tags []tag
}
i := item{
Tags: []tag{
{Name: "one"},
{Name: "two"},
},
}
rule := `[
true && true,
one(Tags, .Name in ["one"]),
one(Tags, .Name in ["two"]),
one(Tags, .Name in ["one"]) && one(Tags, .Name in ["two"])
]`
resp, err := expr.Eval(rule, i)
Expected Result in v1.15
: [true, true, true, true].
Actual Result in v1.16
: [true, true, true, false].