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 (5250B)


      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/func-expr.template
      5 /*---
      6 description: ObjectBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (function expression)
      7 esid: sec-function-definitions-runtime-semantics-evaluation
      8 features: [rest-parameters]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    FunctionExpression : function ( FormalParameters ) { FunctionBody }
     15 
     16        [...]
     17        3. Let closure be FunctionCreate(Normal, FormalParameters, FunctionBody,
     18           scope, strict).
     19        [...]
     20 
     21    9.2.1 [[Call]] ( thisArgument, argumentsList)
     22 
     23    [...]
     24    7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
     25    [...]
     26 
     27    9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
     28 
     29    1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
     30    [...]
     31 
     32    9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
     33 
     34    [...]
     35    23. Let iteratorRecord be Record {[[iterator]]:
     36        CreateListIterator(argumentsList), [[done]]: false}.
     37    24. If hasDuplicates is true, then
     38        [...]
     39    25. Else,
     40        b. Let formalStatus be IteratorBindingInitialization for formals with
     41           iteratorRecord and env as arguments.
     42    [...]
     43 
     44    13.3.3.4 Static Semantics: IsSimpleParameterList
     45 
     46    BindingElement : BindingPattern
     47 
     48    1. Return false.
     49 
     50    14.1.2 Static Semantics: Early Errors
     51 
     52    FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
     53    FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
     54    FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
     55 
     56    - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
     57      IsSimpleParameterList of FormalParameters is false.
     58 
     59    14.2.1 Static Semantics: Early Errors
     60 
     61    ArrowFunction : ArrowParameters => ConciseBody
     62 
     63    - It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
     64      IsSimpleParameterList of ArrowParameters is false.
     65 
     66    14.3.1 Static Semantics: Early Errors
     67 
     68    MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
     69 
     70    - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
     71      IsSimpleParameterList of UniqueFormalParameters is false.
     72 
     73    MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
     74 
     75    - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
     76      IsSimpleParameterList of PropertySetParameterList is false.
     77 
     78    14.4.1 Static Semantics: Early Errors
     79 
     80    GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
     81 
     82    - It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
     83      IsSimpleParameterList of UniqueFormalParameters is false.
     84 
     85    GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
     86    GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
     87    GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
     88 
     89    - It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
     90      IsSimpleParameterList of UniqueFormalParameters is false.
     91 
     92    14.5.1 Static Semantics: Early Errors
     93 
     94    AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
     95 
     96    - It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
     97      IsSimpleParameterList of UniqueFormalParameters is false.
     98 
     99    AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
    100    AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
    101    AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
    102 
    103    - It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
    104      IsSimpleParameterList of FormalParameters is false.
    105 
    106    14.7.1 Static Semantics: Early Errors
    107 
    108    AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
    109 
    110    - It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
    111      IsSimpleParameterList of UniqueFormalParameters is false.
    112 
    113    AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
    114    AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
    115    AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
    116    AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
    117 
    118    - It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
    119      IsSimpleParameterList of FormalParameters is false.
    120 
    121    14.8.1 Static Semantics: Early Errors
    122 
    123    AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
    124 
    125    - It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
    126      IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
    127 
    128 ---*/
    129 $DONOTEVALUATE();
    130 
    131 0, function({property}) {
    132  "use strict";
    133 };