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

Control flow analysis #26

Open
viega opened this issue Dec 9, 2022 · 1 comment
Open

Control flow analysis #26

viega opened this issue Dec 9, 2022 · 1 comment
Labels
enhancement New feature or request p2

Comments

@viega
Copy link
Contributor

viega commented Dec 9, 2022

Do control flow analysis to be able to detect statically when a variable can be referenced before assignment. Right now, this is a runtime error, and it doesn't need to be.

@viega viega added p2 enhancement New feature or request labels Dec 9, 2022
@viega
Copy link
Contributor Author

viega commented Feb 1, 2023

Also should make sure w/ this analysis it's fine to have:

if (x) {
  y = 2
}
else {
  y = 4
}
echo(string(y))

Right now, you'd need to put y = 0 at the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p2
Projects
None yet
Development

No branches or pull requests

1 participant