mirror of
https://github.com/tc39/test262.git
synced 2025-05-03 06:20:37 +02:00
Early errors may result from parsing the source text of a test file, but they may also result from parsing some other source text as referenced through the ES2015 module syntax. The latter form of early error is not necessarily detectable by ECMAScript parsers, however. Because of this, the label "early" is not sufficiently precise for all Test262 consumers to correctly interpret all tests. Update the "phase" name of "early" to "parse" for all those negative tests that describe errors resulting from parsing of the file's source text directly. A forthcoming commit will update the remaining tests to use a "phase" name that is more specific to module resolution.
53 lines
1.5 KiB
JavaScript
53 lines
1.5 KiB
JavaScript
// This file was procedurally generated from the following sources:
|
|
// - src/function-forms/dflt-params-duplicates.case
|
|
// - src/function-forms/syntax/async-arrow-function.template
|
|
/*---
|
|
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async arrow function expression)
|
|
esid: sec-async-arrow-function-definitions
|
|
features: [default-parameters]
|
|
flags: [generated]
|
|
negative:
|
|
phase: parse
|
|
type: SyntaxError
|
|
info: |
|
|
14.7 Async Arrow Function Definitions
|
|
|
|
AsyncArrowFunction :
|
|
...
|
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
|
|
|
AsyncConciseBody :
|
|
{ AsyncFunctionBody }
|
|
|
|
...
|
|
|
|
Supplemental Syntax
|
|
|
|
When processing an instance of the production AsyncArrowFunction :
|
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
|
|
|
AsyncArrowHead :
|
|
async ArrowFormalParameters
|
|
|
|
14.1.2 Static Semantics: Early Errors
|
|
|
|
StrictFormalParameters : FormalParameters
|
|
|
|
- It is a Syntax Error if BoundNames of FormalParameters contains any
|
|
duplicate elements.
|
|
|
|
FormalParameters : FormalParameterList
|
|
|
|
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
|
|
false and BoundNames of FormalParameterList contains any duplicate
|
|
elements.
|
|
|
|
---*/
|
|
throw "Test262: This statement should not be evaluated.";
|
|
|
|
|
|
(async (x = 0, x) => {
|
|
|
|
});
|