mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Lexical redeclarations in block- and switch-statements Background feedback from @anba: In https://tc39.github.io/ecma262/#sec-switch-statement-static-semantics-lexicallydeclarednames, all lexically declared names from the different case clauses are combined. For each case clause, the LexicallyDeclaredNames definition from https://tc39.github.io/ecma262/#sec-block-static-semantics-lexicallydeclarednames applies, which has: ``` StatementListItem : Declaration 1. Return the BoundNames of Declaration. ``` And in https://tc39.github.io/ecma262/#prod-Declaration we've got: ``` Declaration[Yield, Await] : HoistableDeclaration[?Yield, ?Await, ~Default] ``` And in https://tc39.github.io/ecma262/#prod-HoistableDeclaration: ``` HoistableDeclaration[Yield, Await, Default] : FunctionDeclaration[?Yield, ?Await, ?Default] ``` And the BoundNames of a FunctionDeclaration is its BindingIdentifier https://tc39.github.io/ecma262/#sec-function-definitions-static-semantics-boundnames. And there's also B3.3.5 (https://tc39.github.io/ecma262/#sec-switch-duplicates-allowed-static-semantics) which allows duplicate FunctionDeclarations in sloppy mode in switch-statements.
Test262 is the official ECMAScript (ECMA-262) conformance suite.
Test262 tests conformance to the continually maintained draft future ECMAScript standard found at http://tc39.github.io/ecma262/ , together with any Stage 3 or later TC39 proposals. It is maintained by Tom Care (@tcare) and Leo Balter (@leobalter) with significant contributions from many in the ECMAScript community.
Contributing to Test262
See CONTRIBUTING.md
- Sign the Test262 CLA.
- Send a pull request. Please make sure you have one commit per pull request. If you have multiple commits, squash them before sending the pull request.
Running Test262
See INTERPRETING.md
There are a number of volunteer-maintained projects that may be used to execute Test262 in various ECMAScript hosts:
- https://github.com/bterlson/test262-harness (platform: Node.js)
- https://github.com/test262-utils/test262-harness-py (platform: Python)
- https://bakkot.github.io/test262-web-runner/ (platform: web)
Description
Languages
JavaScript
99.7%
Python
0.2%