You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Function with certain parameters and signatures result in false positive of passing too few arguments to a function.
To Reproduce
Here's a simple Lua code that reproduces the issue.
---@aliasFDownloadCallbackfun(status: integer, body: string, headers: table<string, string>)---@aliashttp_method'"get"'|'"head"'|'"post"'|'"put"'|'"delete"'|'"options"'|'"patch"'---@aliashttps_opts{method:http_method,headers:table<string,string>,data:string}---@paramurlstring---@paramoptshttps_opts---@paramcallbackFDownloadCallbackfunctionRequest(url, opts, callback)
end---@returnFDownloadCallbackfunctionDecodeJSONResponse(cb, endpoint)
end-- Note: the whole `Request` function call is highlighted.Request(
dest,
{data=newData, method=dataand"post" or"get", headers=newHeaders},
DecodeJSONResponse(callback, endpoint)
)
I'm getting warning "the function received at least 3 arguments, but got 2." in Request function but as you can see I passed
3 parameters. Weirdly if I put the result of DecodeJSONResponse function then pass that to Request, the issue doesn't occur.
Expected behavior
No warnings.
Screenshots
Environment (please complete the following information):
Describe the bug
Function with certain parameters and signatures result in false positive of passing too few arguments to a function.
To Reproduce
Here's a simple Lua code that reproduces the issue.
I'm getting warning "the function received at least 3 arguments, but got 2." in
Request
function but as you can see I passed3 parameters. Weirdly if I put the result of
DecodeJSONResponse
function then pass that toRequest
, the issue doesn't occur.Expected behavior
No warnings.
Screenshots

Environment (please complete the following information):
Provide logs
file_d%3A_Data_Development_love-11.3-win64_nlay.log
The text was updated successfully, but these errors were encountered: