Skip to content

[explicit-resource-management] Add remaining tests specific to await using statement syntax #4481

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbuckton
Copy link
Contributor

In an effort to make review more manageable, this extracts the remaining tests specific to await using statement syntax from #3866

@rbuckton rbuckton requested a review from a team as a code owner May 12, 2025 15:44
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

I learned a lot reviewing this PR. Thanks!

// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: pending
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should block the PR on this, but if you do have a chance I'd appreciate it if you could replace pending with the relevant HTML section anchor throughout the PR.


$DONOTEVALUATE();
async function f() {
await using x = null, y;
Copy link
Contributor

Choose a reason for hiding this comment

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

I was confused about where this is prohibited, but I figured it out eventually: it's in IsConstantDeclaration. Not a big deal, but it might be helpful to include that in the description or info in this and the following few tests.

Comment on lines +13 to +17
asyncTest(async function () {
await assert.throwsAsync(TypeError, async function() {
for (await using i = 0; i < 1; i++) {}
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

/*---
esid: pending
description: >
await using: invalid assignment in Statement body
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be good to note in the info that the error is thrown in CreateDisposableResource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants