tor-browser

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

call-spread-mult-obj-ident.js (1892B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/spread/mult-obj-ident.case
      3 // - src/spread/default/super-call.template
      4 /*---
      5 description: Object Spread operator following other properties (SuperCall)
      6 esid: sec-super-keyword-runtime-semantics-evaluation
      7 features: [object-spread]
      8 flags: [generated]
      9 includes: [propertyHelper.js]
     10 info: |
     11    SuperCall : super Arguments
     12 
     13    1. Let newTarget be GetNewTarget().
     14    2. If newTarget is undefined, throw a ReferenceError exception.
     15    3. Let func be GetSuperConstructor().
     16    4. ReturnIfAbrupt(func).
     17    5. Let argList be ArgumentListEvaluation of Arguments.
     18    [...]
     19 
     20    Pending Runtime Semantics: PropertyDefinitionEvaluation
     21 
     22    PropertyDefinition:...AssignmentExpression
     23 
     24    1. Let exprValue be the result of evaluating AssignmentExpression.
     25    2. Let fromValue be GetValue(exprValue).
     26    3. ReturnIfAbrupt(fromValue).
     27    4. Let excludedNames be a new empty List.
     28    5. Return CopyDataProperties(object, fromValue, excludedNames).
     29 
     30 ---*/
     31 let o = {c: 3, d: 4};
     32 
     33 
     34 var callCount = 0;
     35 
     36 class Test262ParentClass {
     37  constructor(obj) {
     38    assert.sameValue(Object.keys(obj).length, 4);
     39 
     40    verifyProperty(obj, "a", {
     41      enumerable: true,
     42      writable: true,
     43      configurable: true,
     44      value: 1
     45    });
     46 
     47    verifyProperty(obj, "b", {
     48      enumerable: true,
     49      writable: true,
     50      configurable: true,
     51      value: 2
     52    });
     53 
     54    verifyProperty(obj, "c", {
     55      enumerable: true,
     56      writable: true,
     57      configurable: true,
     58      value: 3
     59    });
     60 
     61    verifyProperty(obj, "d", {
     62      enumerable: true,
     63      writable: true,
     64      configurable: true,
     65      value: 4
     66    });
     67    callCount += 1;
     68  }
     69 }
     70 
     71 class Test262ChildClass extends Test262ParentClass {
     72  constructor() {
     73    super({a: 1, b: 2, ...o});
     74  }
     75 }
     76 
     77 new Test262ChildClass();
     78 assert.sameValue(callCount, 1);
     79 
     80 reportCompare(0, 0);