summaryrefslogtreecommitdiff
path: root/src/dstr-binding/obj-ptrn-prop-ary-trailing-comma.case
blob: 17007b54cf19160208ce5508c2d4dfe5af908bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
template: default
desc: Trailing comma is allowed following BindingPropertyList
info: |
    13.3.3 Destructuring Binding Patterns

    ObjectBindingPattern[Yield] :
        { }
        { BindingPropertyList[?Yield] }
        { BindingPropertyList[?Yield] , }
---*/

//- elems
{ x: [y], }
//- vals
{ x: [45] }
//- body
assert.sameValue(y,45);