tor-browser

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

gen-meth-object-destructuring-param-strict-body.js (5601B)


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