LuaLS / lua-language-server

A language server that offers Lua language support - programmed in Lua
https://luals.github.io
MIT License
3.12k stars 289 forks source link

Redundant "Unable to execute code after break" diagnostic is given when using a label after a break #2686

Open raiguard opened 1 month ago

raiguard commented 1 month ago

How are you using the lua-language-server?

Kakoune

Which OS are you using?

Linux

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

No diagnostic is given.

Actual Behaviour

A diagnostic Unable to execute code after 'break' is given, even though the only thing after the break is a label. image

Reproduction steps

Reproducible with the following code:

for i = 1, 10 do
  if i < 8 then
    print(i)
    goto continue
  end
  break
  ::continue::
end

Additional Notes

No response

Log File

The log isn't very relevant in this case but here it is anyway. luals.log