2015-04-14 23:23:04 +02:00
|
|
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2015-07-08 22:09:57 +02:00
|
|
|
description: Assignment of function `name` attribute
|
|
|
|
es6id: 14.4.12
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-07-08 22:09:57 +02:00
|
|
|
GeneratorDeclaration :
|
|
|
|
function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
|
|
|
|
|
|
|
|
[...]
|
|
|
|
6. Perform SetFunctionName(F, name).
|
2015-04-14 23:23:04 +02:00
|
|
|
includes: [propertyHelper.js]
|
2017-10-04 22:12:34 +02:00
|
|
|
features: [generators]
|
2015-04-14 23:23:04 +02:00
|
|
|
---*/
|
|
|
|
|
2015-07-08 22:09:57 +02:00
|
|
|
function* g() {}
|
2015-04-14 23:23:04 +02:00
|
|
|
|
|
|
|
assert.sameValue(g.name, 'g');
|
|
|
|
verifyNotEnumerable(g, 'name');
|
|
|
|
verifyNotWritable(g, 'name');
|
|
|
|
verifyConfigurable(g, 'name');
|