tor-browser

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

static-method-gen-non-configurable-err.js (668B)


      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-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
      5 es6id: 14.4.13
      6 description: Failure to define property for static generator method
      7 info: |
      8  [...]
      9  10. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]:
     10      true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
     11  11. Return ? DefinePropertyOrThrow(object, propKey, desc). 
     12 features: [generators]
     13 ---*/
     14 
     15 assert.throws(TypeError, function() {
     16  class C { static *['prototype']() {} }
     17 });
     18 
     19 reportCompare(0, 0);