Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalar functions defined with vararg_scalar_fn_overloads require at least 1 argument #516

Open
sadderchris opened this issue Oct 24, 2024 · 0 comments

Comments

@sadderchris
Copy link

This might be a minor nit, but it would be nice if you could specify the number of required arguments when calling vararg_scalar_fn_overloads, rather than requiring vararg functions that define overloads with this function to always have 1 required argument. Of course, you can always define your own helper function for this purpose, but it avoids duplicating this logic into your own code if this function can be made more flexible.

Right now this behavior isn't documented by this function at all; you need to read the source to understand that this creates variadic overloads where 1 argument is required, but no overload for 0 args. This took me by surprise when I was exploring how to resolve scalar functions by id + overload and how to define scalar functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant