topdown: Support indexof_n built-in function (#4172)

Fixes https://github.com/open-policy-agent/opa/issues/4155

Signed-off-by: shuheiktgw <s-kitagawa@mercari.com>
This commit is contained in:
Shuhei Kitagawa
2022-01-06 17:58:27 +09:00
committed by GitHub
parent 449fdfee1e
commit 52ddfd9149
5 changed files with 117 additions and 9 deletions
+20
View File
@@ -1090,6 +1090,26 @@
"type": "function"
}
},
{
"name": "indexof_n",
"decl": {
"args": [
{
"type": "string"
},
{
"type": "string"
}
],
"result": {
"dynamic": {
"type": "number"
},
"type": "array"
},
"type": "function"
}
},
{
"name": "internal.member_2",
"decl": {