summaryrefslogtreecommitdiff
path: root/src/dstr-assignment/obj-rest-not-last-element-invalid.case
blob: a38b18f5f3002ca633e8910e7232462bda67370c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
desc: >
    Object rest element needs to be the last AssignmenProperty
    in ObjectAssignmentPattern.
template: syntax
esid: pending
negative:
  phase: parse
  type: SyntaxError
features: [object-rest]
---*/

//- setup
throw "Test262: This statement should not be evaluated.";
var rest, b;
//- elems
{...rest, b}
//- vals
{}