Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/generator-prop-name-yield-id.js

raw
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 When the `yield` keyword occurs within the PropertyName of a
7 GeneratorMethod outside of a generator function, it behaves as an
8 Identifier.
9 es6id: 14.4
10 features: [generators]
11 flags: [noStrict]
12 ---*/
13
14 var yield = 'propName';
15 var obj = {
16 *[yield]() {}
17 };
18
19 assert.sameValue(Object.hasOwnProperty.call(obj, 'propName'), true);