Re: Variadic functions and dynamic function calls

On Thu, 10 Dec 2020 at 13:06, Michael Kay <mike@saxonica.com> wrote:

>
> My thinking is that the last argument to an array-variadic function is
> either an array, or the item-type it is an array over. That is, a function
> reference name#arity where arity is the number of parameters in the
> array-variadic function is a union-of(array(T), T). For function matching
> rules, this would mean that the last parameter can either be an array(T) or
> T.
>
>
> The problem is, it can be both. For example if T = array(*), and you
> supply `[[]]` then the supplied argument satisfies both array(T) and T. So
> we can't use the dynamic type of the argument to resolve the ambiguity.
>

Ah yes, you are right.

Kind regards,
Reece


> Michael Kay
> Saxonica
>

Received on Thursday, 10 December 2020 13:16:34 UTC