-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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
is nil
.
Actual Behaviour
A warning is printed
Reproduction steps
local foo = {}
local bar = foo[1] or error("Not found")
print(bar.asd) -- Need check nil.
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working