I have a variadic function foo(...: string): string which performs some sort of reduce on its argument by calling foo("literal", select(2, ...)). Now tl check gives me the following error wrong number of arguments (given 2, expects 1) on this call of foo.
Currently I'm collecting the arguments in a table so I can use table.unpack in the function argument when calling foo. But of course this additional table construction is actually unneeded. Also if I do this call outside of function foo, there is no error.
I have a variadic
function foo(...: string): string
which performs some sort of reduce on its argument by callingfoo("literal", select(2, ...))
. Nowtl check
gives me the following errorwrong number of arguments (given 2, expects 1)
on this call offoo
.Currently I'm collecting the arguments in a table so I can use
table.unpack
in the function argument when callingfoo
. But of course this additional table construction is actually unneeded. Also if I do this call outside of functionfoo
, there is no error.Here's the playground wit that code
I hope this information are enough to reproduce and understand the problem.