lua-language-server
lua-language-server copied to clipboard
@generic return ignores question mark
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
Type of y in example below is integer?
Actual Behaviour
Type of y in example below is integer
Reproduction steps
---@generic T
---@param test T
---@return T?
function Func(test)
end
--- @return integer?
function Func2()
end
local x = 0
local y = Func(x)
local z = Func2()
Additional Notes
T | nil works as a workaround.
Log File
No response