test262/src/dstr-binding/ary-ptrn-rest-not-final-obj.case
2018-10-23 13:51:17 +02:00

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]