Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/name-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 non-generator MethodDefinition outside of a generator function, it behaves
8 as an Identifier.
9 es6id: 14.3
10 flags: [noStrict]
11 ---*/
12
13 var yield = 'propName';
14 var obj = {
15 [yield]() {}
16 };
17
18 assert.sameValue(Object.hasOwnProperty.call(obj, 'propName'), true);