Debian Codegraph @

js/src/tests/test262/language/statements/let/dstr/ary-ptrn-rest-init-obj.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/dstr-binding/ary-ptrn-rest-init-obj.case
4 // - src/dstr-binding/default/let-stmt.template
5 /*---
6 description: Rest element (nested object pattern) does not support initializer (`let` statement)
7 esid: sec-let-and-const-declarations-runtime-semantics-evaluation
8 features: [destructuring-binding]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 LexicalBinding : BindingPattern Initializer
15
16 1. Let rhs be the result of evaluating Initializer.
17 2. Let value be GetValue(rhs).
18 3. ReturnIfAbrupt(value).
19 4. Let env be the running execution context's LexicalEnvironment.
20 5. Return the result of performing BindingInitialization for BindingPattern
21 using value and env as the arguments.
22
23 13.3.3 Destructuring Binding Patterns
24 ArrayBindingPattern[Yield] :
25 [ Elisionopt BindingRestElement[?Yield]opt ]
26 [ BindingElementList[?Yield] ]
27 [ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ]
28 ---*/
29 $DONOTEVALUATE();
30
31 let [...{ x } = []] = [];
32
33