tests/auto/qml/ecmascripttests/test262/test/language/expressions/arrow-function/syntax/arrowparameters-cover-initialize-2.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 | es6id: 14.2.1 |
| 5 | description: > |
| 6 | ArrowParameters[Yield] : |
| 7 | ... |
| 8 | CoverParenthesizedExpressionAndArrowParameterList[?Yield] |
| 9 | |
| 10 | 12.14.5 |
| 11 | ---*/ |
| 12 | var af = ({x = 1}) => x; |
| 13 | |
| 14 | assert.sameValue(typeof af, "function"); |
| 15 | assert.sameValue(af({}), 1); |
| 16 | assert.sameValue(af({x: 2}), 2); |