Builtin function in an "existing package" #147
ricleal-fugue
started this conversation in
Community
Replies: 1 comment 3 replies
-
Built-in functions aren't bound to a package. I'm a little surprised by the error message though, as I wouldn't have expected the name to be treated as any other (i.e. without consideration for the package it was in), and this seems to be the case for other built-ins. This works fine, for example: package object
foo := object.get(input, "bar", null) How are you referencing that function in your policy? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
So I have
rego
package calledpack
where I have few functions.I created a builtin function as if it was in this package:
I have a few modules that use this builtin function.
When I compile these modules with the builtin created:
The compiler fails with the message:
Is this normal? The builtins have to be declared in a new package?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions