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