generator-name-prop-symbol.js (576B)
1 // Copyright (C) 2015 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: > 6 Generator functions declared as methods are assigned a `name` property 7 according to the string value of their property name. 8 es6id: 14.4.13 9 includes: [propertyHelper.js] 10 features: [Symbol, generators] 11 ---*/ 12 13 var m = Symbol('method'); 14 var method = { *[m]() {} }[m]; 15 16 verifyProperty(method, 'name', { 17 value: '[method]', 18 writable: false, 19 enumerable: false, 20 configurable: true, 21 }); 22 23 reportCompare(0, 0);