shapesecurity / shift-parser-js

ECMAScript parser that produces a Shift format AST
http://shift-ast.org/parser.html
Apache License 2.0
249 stars 28 forks source link

incorrectly disallows `in` expressions in function-bodied arrows in for statement initialisers #348

Closed michaelficarra closed 7 years ago

michaelficarra commented 7 years ago

This should be allowed but is not:

for (() => { this in a };;);

Originally reported by @lydell in https://github.com/shapesecurity/shift-codegen-js/issues/54

lydell commented 7 years ago

Slight correction:

This is currently allowed:

for (() => {(this in a)};;);

And this should be allowed but currently isn’t:

for (() => {this in a};;);
michaelficarra commented 7 years ago

Correct. Copy/paste error. I will edit my original message to avoid confusion.