js/src/tests/test262/language/statements/for-of/head-using-bound-names-in-stmt.js
author Lando <lando@lando.test>
Fri, 11 Jul 2025 09:11:47 +0000 (4 hours ago)
changeset 796052 0a0cf87651274d2f86228467e41dafd62a510749
parent 788559 81974a48653c73ad24e330bb763a7bd96e059e91
permissions -rw-r--r--
Merge autoland to mozilla-central
// |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) error:SyntaxError -- explicit-resource-management is not enabled unconditionally, requires shell-options
// Copyright (C) 2023 Ron Buckton. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: The body may not re-declare variables declared in the head
negative:
  phase: parse
  type: SyntaxError
info: |
    It is a Syntax Error if any element of the BoundNames of ForDeclaration
    also occurs in the VarDeclaredNames of Statement.
esid: sec-for-in-and-for-of-statements
features: [explicit-resource-management]
---*/

$DONOTEVALUATE();

for (using x of []) {
  var x;
}