Skip to content

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

@sadderchris

Description

@sadderchris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions