instance-name.js (845B)
1 // Copyright (C) 2018 Valerie Young. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-asyncgeneratorfunction 6 description: Assignment of function `name` attribute 7 info: | 8 AsyncGeneratorFunction ( p1, p2, … , pn, body ) 9 ... 10 3. Return CreateDynamicFunction(C, NewTarget, "async generator", args). 11 12 RuntimeSemantics: CreateDynamicFunction(constructor, newTarget, kind, args) 13 ... 14 29. Perform SetFunctionName(F, "anonymous"). 15 includes: [propertyHelper.js] 16 features: [async-iteration] 17 ---*/ 18 19 var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor; 20 21 var instance = AsyncGeneratorFunction() 22 23 verifyProperty(instance, "name", { 24 value: "anonymous", 25 enumerable: false, 26 writable: false, 27 configurable: true, 28 }); 29 30 reportCompare(0, 0);