tor-browser

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

prop-expr-cls-unresolvable.js (878B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-super-keyword
      5 es6id: 12.3.5
      6 description: Abrupt completion from Reference resolution
      7 info: |
      8  1. Let propertyNameReference be the result of evaluating Expression.
      9  2. Let propertyNameValue be ? GetValue(propertyNameReference).
     10 
     11  6.2.3.1 GetValue
     12 
     13  1. ReturnIfAbrupt(V).
     14  2. If Type(V) is not Reference, return V.
     15  3. Let base be GetBase(V).
     16  4. If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
     17 features: [class]
     18 ---*/
     19 
     20 var caught;
     21 class C {
     22  method() {
     23    try {
     24      super[test262unresolvable];
     25    } catch (err) {
     26      caught = err;
     27    }
     28  }
     29 }
     30 
     31 C.prototype.method();
     32 
     33 assert.sameValue(typeof caught, 'object');
     34 assert.sameValue(caught.constructor, ReferenceError);
     35 
     36 reportCompare(0, 0);