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

yield as the default value in arrow expression should not be a yield expression #165

Closed
ariya opened this issue Jul 15, 2015 · 3 comments
Closed
Labels

Comments

@ariya
Copy link

ariya commented Jul 15, 2015

Test case:

function() {
    var espree = require('espree');
    var options = { ecmaFeatures: { generators: true, arrowFunctions: true, defaultParams: true } };
    var ast = espree.parse('function *g() { (x = yield) => {} }', options);
    return ast.body[0].body.body[0].expression.params[0].right.type;
}

Actual: YieldIdentifier.

Expected: Identifier.

@nzakas
Copy link
Member

nzakas commented Jul 16, 2015

Thanks!

@nzakas
Copy link
Member

nzakas commented Jul 16, 2015

Working on this.

@nzakas
Copy link
Member

nzakas commented Jul 16, 2015

Is this true for function expressions as well as arrow functions?

@nzakas nzakas closed this as completed in 725e9f9 Jul 16, 2015
nzakas added a commit that referenced this issue Jul 16, 2015
Fix: Yield as identifier in arrow func args (fixes #165)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants