mirror of
https://github.com/tc39/test262.git
synced 2025-07-16 10:34:44 +02:00
24 lines
622 B
Plaintext
24 lines
622 B
Plaintext
// 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 (object binding pattern) 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]
|