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
Variant 1:
Type 'any' allows any type except 'nil'. Type nil it's nil, not any. @param cc any|nil should allow to use nil type
Variant 2:
When checking a type, you need to always have an argument, no matter what type. The argument must be specified in the method call. Сalling with an empty argument is not allowed
Variant 3: a special flag in param annotation that indicates an argument must be specified here
Actual Behaviour
---@param cc any
local function Test(cc)
print(cc)
end
Test() -- no error
Type any allow nil type.
For example:
LUA + luabind C++.
C++ required argument on all bindings. Test(nil) and Test() have different behaviour for luabind.
Reproduction steps
Go to '...'
Click '...'
See error '...'
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered:
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Type Checking
Expected Behaviour
Variant 1:
Type 'any' allows any type except 'nil'. Type nil it's nil, not any.
@param cc any|nil should allow to use nil type
Variant 2:
When checking a type, you need to always have an argument, no matter what type. The argument must be specified in the method call. Сalling with an empty argument is not allowed
Variant 3: a special flag in param annotation that indicates an argument must be specified here
Actual Behaviour
Type any allow nil type.
For example:
LUA + luabind C++.
C++ required argument on all bindings. Test(nil) and Test() have different behaviour for luabind.
Reproduction steps
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: