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

for..of throws #207

Closed
kangax opened this issue Oct 20, 2016 · 0 comments
Closed

for..of throws #207

kangax opened this issue Oct 20, 2016 · 0 comments
Labels
bug Confirmed bug

Comments

@kangax
Copy link
Member

kangax commented Oct 20, 2016

This currently throws in Babili but shouldn't:

!function () { 
  for (var x of y) {
    alert(1);
  }
}()
boopathi added a commit that referenced this issue Oct 22, 2016
for..of and for..await loops are not considered in DCE and unused var
declarations in these loops are removed and this results in an empty
LVal. The same exception which is considered for a for..in loop is
also applied for for..of or for..await loops, and we use an Alias
that Babel provides - ForXStatement which is a for..in, for..of, or
a for..await loop.

+ (Close #207)
@boopathi boopathi added the bug Confirmed bug label Oct 22, 2016
@hzoo hzoo closed this as completed in #214 Oct 22, 2016
hzoo pushed a commit that referenced this issue Oct 22, 2016
* Fix bug: support for for..of/for..await in DCE

for..of and for..await loops are not considered in DCE and unused var
declarations in these loops are removed and this results in an empty
LVal. The same exception which is considered for a for..in loop is
also applied for for..of or for..await loops, and we use an Alias
that Babel provides - ForXStatement which is a for..in, for..of, or
a for..await loop.

+ (Close #207)

* Enable async generators test

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

No branches or pull requests

2 participants