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

Values are propagated from conditionals which don't execute #4

Open
samczsun opened this issue Jan 24, 2018 · 1 comment
Open

Values are propagated from conditionals which don't execute #4

samczsun opened this issue Jan 24, 2018 · 1 comment

Comments

@samczsun
Copy link

Input:

x = 1;
if (false) {
	x--;
}
if (x == 0) {
  alert(1);
}

Output:

x = 1;
if (false) {
    1;
}
if (true) {
    alert(1);
}
@wisec
Copy link
Contributor

wisec commented Jan 24, 2018

Good one!
The tricky part will be to discriminate when it’s ok to propagate values on more complex situations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants