-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add using
and await using
Declarations, SuppressedError, DisposableStack, and AsyncDisposableStack
#3000
base: main
Are you sure you want to change the base?
Conversation
b7b82d5
to
17e0bc0
Compare
I'm not quite sure how to address the remaining esmeta issues. |
Rather than suggest changes here, I've made a PR against this PR's branch: rbuckton#2 |
This last commit adds a few UpdateEmpty calls that aren't strictly necessary, but |
@rbuckton Sorry about that - esmeta is still a little imprecise. You should feel free to write the spec text you want and not worry about esmeta's errors, and we can update esmeta or the ignore file. |
I replaced the |
Please note, I've created rbuckton#3 as a separate PR against this one containing the additional specification changes that would be necessary to support https://github.com/tc39/proposal-async-explicit-resource-management, should it advance to Stage 3. |
I found an issue with the change in e4f2d05 to use an EE to restrict binding patterns, in that it results in an ambiguous parse of I've filed tc39/proposal-explicit-resource-management#152 against the proposal spec, and will update this PR in due time. |
tc39/proposal-explicit-resource-management#152 has merged, and I've amended this PR to match as part of 3044fd9. |
This comment was marked as duplicate.
This comment was marked as duplicate.
spec.html
Outdated
It is a Syntax Error if the BoundNames of |BindingList| contains any duplicate entries. | ||
</li> | ||
<li> | ||
It is a Syntax Error if the goal symbol is |Script| and |UsingDeclaration| is not contained, either directly or indirectly, within a |Block|, |CaseBlock|, |ForStatement|, |ForInOfStatement|, |FunctionBody|, |GeneratorBody|, |AsyncGeneratorBody|, |AsyncFunctionBody|, |ClassStaticBlockBody|, or |ClassBody|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbuckton What is an example of a using
contained within a ClassBody
? It can't be directly contained within one, and if indirectly contained, then it would already be directly contained within another production on the list (like ClassStaticBlockBody, FunctionBody, etc). During implementation we found the inclusion of ClassBody in this list confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, ClassBody here is superfluous and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be addressed by tc39/proposal-explicit-resource-management#220 and rbuckton#6
This now includes the |
Note to implementers: There is a typo in |
This is also missing the consensus change to use |
d9d189a
to
4914a91
Compare
Rebased (twice, to make GitHub happy). Hopefully that fixes the PR in the diff review website. |
Hey! now its significantly easier to read from https://arai-a.github.io/ecma262-compare/?pr=3000 thank you so much!! |
More editorial suggestions at rbuckton#11 |
…nullish Reduce unnecessary Awaits for nullish values in blocks containing `await using`
This PR contains the Stage 3 specification text for Explicit Resource Management.
This version of the specification text includes several changes from the version at https://tc39.es/proposal-explicit-resource-management:
IsUsingDeclaration
SDOawait
as an identifier inusing
NOTE: The three PRs above will be discussed in the January, 2023 plenary. I've already made the edits here as I believe they will be non-controversial.