Debian Codegraph @

js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-invalid-strict.js

raw
1 // |reftest| error:SyntaxError
2 'use strict';
3 // This file was procedurally generated from the following sources:
4 // - src/dstr-assignment/array-elem-init-yield-ident-invalid.case
5 // - src/dstr-assignment/syntax/assignment-expr.template
6 /*---
7 description: When a `yield` token appears within the Initializer of an AssignmentElement outside of a generator function body, it behaves as an IdentifierReference. (AssignmentExpression)
8 esid: sec-variable-statement-runtime-semantics-evaluation
9 features: [destructuring-binding]
10 flags: [generated, onlyStrict]
11 negative:
12 phase: parse
13 type: SyntaxError
14 info: |
15 VariableDeclaration : BindingPattern Initializer
16
17 1. Let rhs be the result of evaluating Initializer.
18 2. Let rval be GetValue(rhs).
19 3. ReturnIfAbrupt(rval).
20 4. Return the result of performing BindingInitialization for
21 BindingPattern passing rval and undefined as arguments.
22 ---*/
23 $DONOTEVALUATE();
24
25 0, [ x = yield ] = [];