Add using and await using Declarations, SuppressedError, DisposableStack, and AsyncDisposableStack#3000
Add using and await using Declarations, SuppressedError, DisposableStack, and AsyncDisposableStack#3000
using and await using Declarations, SuppressedError, DisposableStack, and AsyncDisposableStack#3000Conversation
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.
|
This now includes the |
|
Note to implementers: There is a typo in |
|
This is also missing the consensus change to use |
The placement of the two new Supplemetal Syntaxes, for Also, in the latter, the main body says "When processing an instance...", but Annex A says " In certain circumstances when processing an instance..." |
|
ce12f16 to
2701bff
Compare
I'll have another look at some point. There's also some weirdness in the SDO coverage, but it might be my code, so that'll take a while to investigate. |
I suggested `variants="Disposable object"` because I suggested putting <dfn> around "Disposable interface" (similar to the dfn for other interfaces). If instead you put <dfn> around only "Disposable", then you don't need the variants attribute, because any occurrence of "Disposable object" will get the "Disposable" auto-linked. Ditto AsyncDisposable.
(Insert appropriate algorithm.)
An ExportDeclaration is a ModuleItem, not a Declaration, so I don't think IsUsingDeclaration or IsAwaitUsingDeclaration would ever be applied to an ExportDeclaration.
IsFunctionDefinition, AssignmentTargetType, and HasCallInTailPosition already have explicit rules for CoverAwaitExpressionAndAwaitUsingDeclarationHead, and AwaitExpression only arises by reparsing CoverAwaitExpressionAndAwaitUsingDeclarationHead, so those SDOs would never reach AwaitExpression.
At this point, you know that _method_ is present, and therefore must be a function object, and so IsCallable(_method_) must be *true*, so this step can't do anything.
The use of _env_.[[DisposeCapability]] assumes that _env_ is a Declarative Environment Record, though I'm not sure that's the case.
|
Rather than add comments here, I've created rbuckton#16 against this PR's branch. |
Suggested changes
|
Last batch of commits address feedback discussed during the editor meeting. |
This PR contains the Stage 3 specification text for Explicit Resource Management.