keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 1 | // This file was procedurally generated from the following sources: |
| 2 | // - src/dstr-assignment/obj-prop-nested-obj-yield-ident-invalid.case |
| 3 | // - src/dstr-assignment/syntax/assignment-expr.template |
| 4 | /*--- |
| 5 | description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression) |
| 6 | esid: sec-variable-statement-runtime-semantics-evaluation |
| 7 | es6id: 13.3.2.4 |
| 8 | features: [destructuring-binding] |
| 9 | flags: [generated, onlyStrict] |
| 10 | negative: SyntaxError |
| 11 | info: | |
| 12 | VariableDeclaration : BindingPattern Initializer |
| 13 | |
| 14 | 1. Let rhs be the result of evaluating Initializer. |
| 15 | 2. Let rval be GetValue(rhs). |
| 16 | 3. ReturnIfAbrupt(rval). |
| 17 | 4. Return the result of performing BindingInitialization for |
| 18 | BindingPattern passing rval and undefined as arguments. |
| 19 | ---*/ |
| 20 | |
| 21 | 0, { x: { x = yield } } = { x: {} }; |