tor-browser

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

named-rest-param-strict-body.js (4550B)


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