Normative: add missing AsyncGenerator cases to ContainsArguments#2505
Merged
Normative: add missing AsyncGenerator cases to ContainsArguments#2505
Conversation
afa799e to
59aaf8a
Compare
Member
Author
|
I disagree with the |
This comment has been minimized.
This comment has been minimized.
michaelficarra
approved these changes
Sep 13, 2021
59aaf8a to
2e131c2
Compare
mathiasbynens
pushed a commit
to mathiasbynens/ecma262
that referenced
this pull request
Oct 18, 2021
mathiasbynens
pushed a commit
to mathiasbynens/ecma262
that referenced
this pull request
Oct 18, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ContainsArguments, added in #1668, is used to forbid class field initializers which refer to the outer
argumentsbinding. It's not intended to descend into non-arrow functions, since those introduce their own binding forarguments, which is fine. Unfortunately it was accidentally missing theAsyncGeneratorcases, meaning that, as written,(class { x = async function*(){ arguments } })was an Early Error, unlike(class { x = function*(){ arguments } })or(class { x = async function(){ arguments } }).Engine262 actually implements the specified behavior, but no other engine I tested did.
This is technically normative, because the current semantics are coherent, but I think we need not seek consensus for it - it was definitely just an oversight.
The first commit is just a reorganization of the SDO to make it easier to read. I suggest reviewing (and landing) the commits separately.