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

[Merged by Bors] - Add early error for yield in GeneratorExpression parameters #2413

Closed
wants to merge 2 commits into from

Conversation

raskad
Copy link
Member

@raskad raskad commented Nov 6, 2022

This Pull Request changes the following:

  • Add early error for yield in GeneratorExpression parameters

@raskad raskad added bug Something isn't working parser Issues surrounding the parser labels Nov 6, 2022
@raskad raskad added this to the v0.17.0 milestone Nov 6, 2022
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Test262 conformance changes

Test result main count PR count difference
Total 93,815 93,815 0
Passed 69,508 69,510 +2
Ignored 18,422 18,422 0
Failed 5,885 5,883 -2
Panics 0 0 0
Conformance 74.09% 74.09% +0.00%
Fixed tests (2):
test/language/expressions/generators/param-dflt-yield.js [strict mode] (previously Failed)
test/language/expressions/generators/param-dflt-yield.js (previously Failed)

@codecov
Copy link

codecov bot commented Nov 6, 2022

Codecov Report

Merging #2413 (ddac6f0) into main (b88736a) will decrease coverage by 0.05%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main    #2413      +/-   ##
==========================================
- Coverage   38.74%   38.69%   -0.06%     
==========================================
  Files         313      314       +1     
  Lines       23856    23887      +31     
==========================================
  Hits         9244     9244              
- Misses      14612    14643      +31     
Impacted Files Coverage Δ
boa_engine/src/string/mod.rs 59.45% <ø> (ø)
...ser/expression/primary/generator_expression/mod.rs 42.55% <25.00%> (-1.64%) ⬇️
boa_ast/src/statement_list.rs 50.00% <0.00%> (-3.85%) ⬇️
boa_ast/src/function/parameters.rs 64.81% <0.00%> (-3.82%) ⬇️
boa_ast/src/property.rs 18.96% <0.00%> (-1.73%) ⬇️
boa_ast/src/pattern.rs 28.11% <0.00%> (ø)
boa_interner/src/sym.rs 25.00% <0.00%> (ø)
boa_ast/src/function/mod.rs 37.93% <0.00%> (ø)
boa_ast/src/statement/if.rs 62.06% <0.00%> (ø)
boa_ast/src/statement/mod.rs 34.78% <0.00%> (ø)
... and 44 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@@ -130,6 +130,14 @@ where
params_start_position,
)?;

// It is a Syntax Error if FormalParameters Contains YieldExpression is true.
Copy link
Member

@jasonwilliams jasonwilliams Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// https://tc39.es/ecma262/#sec-generator-function-definitions-static-semantics-early-errors

I think the above comment is also pointing to function definitions not generator function definitions which is slightly different.

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Nov 7, 2022
This Pull Request changes the following:

- Add early error for `yield` in `GeneratorExpression` parameters
@bors
Copy link

bors bot commented Nov 7, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Add early error for yield in GeneratorExpression parameters [Merged by Bors] - Add early error for yield in GeneratorExpression parameters Nov 7, 2022
@bors bors bot closed this Nov 7, 2022
@bors bors bot deleted the generator-expr-parameter-yield-error branch November 7, 2022 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants