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

Flag locals that can moved to an inner scope and/or later #38

Open
arichard4 opened this issue Nov 23, 2021 · 0 comments
Open

Flag locals that can moved to an inner scope and/or later #38

arichard4 opened this issue Nov 23, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@arichard4
Copy link

arichard4 commented Nov 23, 2021

local x = {}

if should_early_out then
    return
end

-- Accesses to x
local x = {}
if not should_early_out then
    -- Accesses to x
end
-- No accesses to x outside of that inner scope
@alerque alerque added the enhancement New feature or request label Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants