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

Wrong support of inner locals in conditional statements (microScript 2.0) #156

Closed
pmgl opened this issue Aug 30, 2022 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@pmgl
Copy link
Owner

pmgl commented Aug 30, 2022

f = function( x )
  local num = 42            // this creates a local variable num
  if x == 1 then
    local num = 98765       // this creates another local variable num within a narrower block...
  end
  return num       // this should return 42 in all cases
end 

print(f(0))
@pmgl pmgl added the bug Something isn't working label Aug 30, 2022
@pmgl pmgl closed this as completed in 8dad568 Aug 30, 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

1 participant