lua-language-server
                                
                                 lua-language-server copied to clipboard
                                
                                    lua-language-server copied to clipboard
                            
                            
                            
                        discard-returns warning is not triggered in while/repeat loops
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?
Annotations
Expected Behaviour
@nodiscard annotated functions should always trigger the discard-returns warning in any context.
Actual Behaviour
discard-returns does not trigger in while and repeat loops.
Reproduction steps
---@nodiscard
local function bar()
 --@nodiscard annotated function
end
	
while true do
   bar() --< this DOES NOT trigger no-discard
   break
end
repeat 
   bar() --< this DOES NOT trigger no-discard
   break
until true
bar() -- < this DOES trigger no-discard
for index, value in ipairs({}) do
	bar()  -- < this DOES trigger no-discard
end
Additional Notes
No response
Log File
No response
Doesn't work in the for loop either.