tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/name-param-id-yield.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 | The BindingIdentifier of a SingleNameBinding witihn the FormalParameters of |
| 7 | a non-generator MethodDefinition may be the `yield` keyword. |
| 8 | es6id: 14.3 |
| 9 | flags: [noStrict] |
| 10 | ---*/ |
| 11 | |
| 12 | var obj = { |
| 13 | method(yield) { |
| 14 | return yield; |
| 15 | } |
| 16 | }; |
| 17 | |
| 18 | |
| 19 | assert.sameValue(obj.method('arg'), 'arg'); |