static-method-non-configurable-err.js (621B)
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 10. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: 10 true, [[Enumerable]]: enumerable, [[Configurable]]: true}. 11 11. Return ? DefinePropertyOrThrow(object, propKey, desc). 12 ---*/ 13 14 assert.throws(TypeError, function() { 15 class C { static ['prototype']() {} } 16 }); 17 18 reportCompare(0, 0);