mirror of
https://github.com/tc39/test262.git
synced 2025-08-18 08:28:27 +02:00
23 lines
563 B
JavaScript
23 lines
563 B
JavaScript
// Copyright (C) 2023 Ron Buckton. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-for-in-and-for-of-statements
|
|
description: >
|
|
ForDeclaration containing 'await using' does not support an initializer
|
|
info: |
|
|
IterationStatement:
|
|
for (ForDeclaration of AssignmentExpression) Statement
|
|
negative:
|
|
phase: parse
|
|
type: SyntaxError
|
|
features: [explicit-resource-management]
|
|
---*/
|
|
|
|
$DONOTEVALUATE();
|
|
|
|
const obj = { [Symbol.dispose]() { } };
|
|
async function f() {
|
|
for (await using x = obj of []) {}
|
|
}
|