tor-browser

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

super-property-method.js (524B)


      1 // Copyright (C) 2020 Rick Waldron. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-delete-operator-runtime-semantics-evaluation
      5 description: Attempts to delete super reference property references throws ReferenceError exception
      6 features: [class]
      7 ---*/
      8 
      9 class X {
     10  method() {
     11    return this;
     12  }
     13 }
     14 
     15 class Y extends X {
     16  method() {
     17    delete super.method;
     18  }
     19 }
     20 
     21 const y = new Y();
     22 
     23 assert.throws(ReferenceError, () => {
     24  y.method();
     25 });
     26 
     27 reportCompare(0, 0);