2015-12-29 20:56:40 +01:00
|
|
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
es6id: 13.3.3
|
|
|
|
description: >
|
|
|
|
Recursive array and object binding patterns
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-12-29 20:56:40 +01:00
|
|
|
Destructuring Binding Patterns - Syntax
|
|
|
|
|
|
|
|
BindingPattern[Yield] :
|
|
|
|
ObjectBindingPattern[?Yield]
|
|
|
|
ArrayBindingPattern[?Yield]
|
2018-04-24 20:52:19 +02:00
|
|
|
features: [destructuring-binding]
|
2015-12-29 20:56:40 +01:00
|
|
|
---*/
|
|
|
|
|
|
|
|
function fn1([{}]) {}
|
|
|
|
|
|
|
|
function fn2([{a: [{}]}]) {}
|
|
|
|
|
|
|
|
function fn3({a: [,,,] = 42}) {}
|
|
|
|
|
|
|
|
function fn4([], [[]], [[[[[[[[[x]]]]]]]]]) {}
|
|
|
|
|
|
|
|
function fn4([[x, y, ...z]]) {}
|