Debian Codegraph @

js/src/tests/test262/language/destructuring/binding/syntax/recursive-array-and-object-patterns.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es6id: 13.3.3
6 description: >
7 Recursive array and object binding patterns
8 info: |
9 Destructuring Binding Patterns - Syntax
10
11 BindingPattern[Yield] :
12 ObjectBindingPattern[?Yield]
13 ArrayBindingPattern[?Yield]
14 features: [destructuring-binding]
15 ---*/
16
17 function fn1([{}]) {}
18
19 function fn2([{a: [{}]}]) {}
20
21 function fn3({a: [,,,] = 42}) {}
22
23 function fn4([], [[]], [[[[[[[[[x]]]]]]]]]) {}
24
25 function fn4([[x, y, ...z]]) {}
26
27 reportCompare(0, 0);