blob: 1b92f9e1999748ac7d4a6ec64fb315e430014cb4 [file] [log] [blame]
keith_miller@apple.combcc77f22016-07-15 06:03:25 +00001// This file was procedurally generated from the following sources:
2// - src/dstr-binding/obj-ptrn-prop-obj-value-undef.case
3// - src/dstr-binding/error/const-stmt.template
4/*---
5description: Object binding pattern with "nested" object binding pattern taking the `null` value (`const` statement)
6esid: sec-let-and-const-declarations-runtime-semantics-evaluation
7es6id: 13.3.1.4
8features: [destructuring-binding]
9flags: [generated]
10info: |
11 LexicalBinding : BindingPattern Initializer
12
13 1. Let rhs be the result of evaluating Initializer.
14 2. Let value be GetValue(rhs).
15 3. ReturnIfAbrupt(value).
16 4. Let env be the running execution context's LexicalEnvironment.
17 5. Return the result of performing BindingInitialization for BindingPattern
18 using value and env as the arguments.
19
20 13.3.3.7 Runtime Semantics: KeyedBindingInitialization
21
22 [...]
23 3. If Initializer is present and v is undefined, then
24 [...]
25 4. Return the result of performing BindingInitialization for BindingPattern
26 passing v and environment as arguments.
27---*/
28
29assert.throws(TypeError, function() {
30 const { w: { x, y, z } = undefined } = { };
31});