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
It reports a warning for f(20) stating that the function doesn't take any arguments.
It looks like coroutine.wrap has the wrong return type:
function coroutine.wrap(f: fun())
-> fun()
─────────────────────────────────────────────────────────────────────────
Creates a new coroutine, with body `f`; `f` must be a function. Returns a
function that resumes the coroutine each time it is called.
[View documents](http://www.lua.org/manual/5.1/manual.html#pdf-coroutine.wrap)
From the reference:
Creates a new coroutine, with body f. f must be a Lua function. Returns a
function that resumes the coroutine each time it is called. Any arguments
passed to the function behave as the extra arguments to resume. Returns the
same values returned by resume, except the first boolean. In case of error,
propagates the error.
The important part is this:
Any arguments passed to the function behave as the extra arguments to resume
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
No warnings reported
Actual Behaviour
Language server publishes diagnostics with a warning with message "This function expects a maximum of 0 argument(s) but instead it is receiving 1."
Reproduction steps
Create a lua file with:
It reports a warning for
f(20)
stating that the function doesn't take any arguments.It looks like
coroutine.wrap
has the wrong return type:From the reference:
The important part is this:
The same is the case in Lua 5.4: http://www.lua.org/manual/5.4/manual.html#6.2
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: