tor-browser

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

object-destructuring-param-strict-body.js (4894B)


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