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
x or error(...)
Visual Studio Code Extension (sumneko.lua)
Linux
Diagnostics/Syntax Checking
I would expect no "Need check nil" diagnostic to be emitted since execution will never reach line 3 if bar is nil.
bar
nil
A warning is printed
local foo = {} local bar = foo[1] or error("Not found") print(bar.asd) -- Need check nil.
No response
The text was updated successfully, but these errors were encountered:
a9fe326
No branches or pull requests
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
I would expect no "Need check nil" diagnostic to be emitted since execution will never reach line 3 if
bar
isnil
.Actual Behaviour
A warning is printed
Reproduction steps
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: