Skip to content
New issue

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

Incorrect unreachable-code after loop #1406

Closed
firas-assaad opened this issue Jul 29, 2022 · 0 comments
Closed

Incorrect unreachable-code after loop #1406

firas-assaad opened this issue Jul 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@firas-assaad
Copy link
Contributor

Describe the bug
The unreachable-code diagnostic is reported after a loop in certain situations.

To Reproduce
Try the following code:

local done = false

local function set_done()
    done = true
end

while not done do
    set_done()
end

print(1)

It probably happens in more complex scenarios too.

Expected behavior
The line with print(1) is reachable and no diagnostics are reported. The line isn't greyed out.

Screenshots
image

Environment (please complete the following information):

  • OS: Windows 10
  • Is WSL remote? No
  • Client: VSCode 1.69.2, extension v3.5.1
@sumneko sumneko added the bug Something isn't working label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants