Debian Codegraph @

js/src/tests/test262/language/statements/for-of/head-await-using-bound-names-in-stmt.js

raw
1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) error:SyntaxError module -- explicit-resource-management is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2023 Ron Buckton. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 description: The body may not re-declare variables declared in the head
6 negative:
7 phase: parse
8 type: SyntaxError
9 info: |
10 It is a Syntax Error if any element of the BoundNames of ForDeclaration
11 also occurs in the VarDeclaredNames of Statement.
12 esid: sec-for-in-and-for-of-statements
13 flags: [module]
14 features: [explicit-resource-management]
15 ---*/
16
17 $DONOTEVALUATE();
18
19 for (await using x of []) {
20 var x;
21 }