tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

array-destructuring-param-strict-body.js (4689B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/function-forms/array-destructuring-param-strict-body.case
      4 // - src/function-forms/syntax/async-gen-func-expr.template
      5 /*---
      6 description: ArrayBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator function expression)
      7 esid: sec-asyncgenerator-definitions-evaluation
      8 features: [rest-parameters, async-iteration]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
     15        AsyncGeneratorBody }
     16 
     17        [...]
     18        3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
     19           AsyncGeneratorBody, scope, strict).
     20        [...]
     21 
     22 
     23    13.3.3.4 Static Semantics: IsSimpleParameterList
     24 
     25    BindingElement : BindingPattern
     26 
     27    1. Return false.
     28 
     29    14.1.2 Static Semantics: Early Errors
     30 
     31    FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
     32    FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
     33    FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
     34 
     35    - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
     36      IsSimpleParameterList of FormalParameters is false.
     37 
     38    14.2.1 Static Semantics: Early Errors
     39 
     40    ArrowFunction : ArrowParameters => ConciseBody
     41 
     42    - It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
     43      IsSimpleParameterList of ArrowParameters is false.
     44 
     45    14.3.1 Static Semantics: Early Errors
     46 
     47    MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
     48 
     49    - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
     50      IsSimpleParameterList of UniqueFormalParameters is false.
     51 
     52    MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
     53 
     54    - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
     55      IsSimpleParameterList of PropertySetParameterList is false.
     56 
     57    14.4.1 Static Semantics: Early Errors
     58 
     59    GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
     60 
     61    - It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
     62      IsSimpleParameterList of UniqueFormalParameters is false.
     63 
     64    GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
     65    GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
     66    GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
     67 
     68    - It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
     69      IsSimpleParameterList of UniqueFormalParameters is false.
     70 
     71    14.5.1 Static Semantics: Early Errors
     72 
     73    AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
     74 
     75    - It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
     76      IsSimpleParameterList of UniqueFormalParameters is false.
     77 
     78    AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
     79    AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
     80    AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
     81 
     82    - It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
     83      IsSimpleParameterList of FormalParameters is false.
     84 
     85    14.7.1 Static Semantics: Early Errors
     86 
     87    AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
     88 
     89    - It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
     90      IsSimpleParameterList of UniqueFormalParameters is false.
     91 
     92    AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
     93    AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
     94    AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
     95    AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
     96 
     97    - It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
     98      IsSimpleParameterList of FormalParameters is false.
     99 
    100    14.8.1 Static Semantics: Early Errors
    101 
    102    AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
    103 
    104    - It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
    105      IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
    106 
    107 ---*/
    108 $DONOTEVALUATE();
    109 
    110 
    111 0, async function*([element]) {
    112  "use strict";
    113 };