We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Other
Linux
Diagnostics/Syntax Checking
I have the minimal example
---@class A ---@field b fun(self: A): table? ---@return A[] local function get_A() local l = {} for _ = 1, 10 do if math.random() > 0.5 then table.insert(l, { b = function(self) return { f = 4 } end }) else table.insert(l, { b = function(self) print("hi" .. tostring(self)) end }) end end return l end local as = get_A() for i = 1, 10 do local a = as[i] if a:b().f > 3 then print("yo") end end
The lsp should give me an error about a:b().f as a:b() could be nil.
a:b().f
a:b()
No warnings are shown.
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How are you using the lua-language-server?
Other
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
I have the minimal example
The lsp should give me an error about
a:b().f
asa:b()
could be nil.Actual Behaviour
No warnings are shown.
Reproduction steps
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: