tor-browser

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

generator-super-prop-body.js (462B)


      1 // Copyright 2015 Cubane Canada, Inc.  All rights reserved.
      2 // See LICENSE for details.
      3 
      4 /*---
      5 info: |
      6 GeneratorMethod can reference SuperProperty in body
      7 features: [generators]
      8 es6id: 14.4.1
      9 author: Sam Mikes
     10 description: GeneratorMethod body uses SuperProperty (allowed)
     11 ---*/
     12 
     13 var obj;
     14 
     15 var obj = {
     16  *foo() {
     17    return super.toString;
     18  }
     19 };
     20 
     21 obj.toString = null;
     22 
     23 assert.sameValue(obj.foo().next().value, Object.prototype.toString);
     24 
     25 reportCompare(0, 0);