blob: 84ce445dd2dc12693f8c6ba6b817ba1717da39d8 [file] [edit]
// 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: Rest element (identifier) may not be followed by any element
negative:
phase: parse
type: SyntaxError
info: >
13.3.3 Destructuring Binding Patterns
ArrayBindingPattern[Yield] :
[ Elisionopt BindingRestElement[?Yield]opt ]
[ BindingElementList[?Yield] ]
[ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ]
---*/
//- setup
$DONOTEVALUATE();
//- elems
[...x, y]
//- vals
[1, 2, 3]