blob: 413ec0439875a9ec3ff5d2981a31ea02b975be2c [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: error
desc: Rest element following elision elements
info: >
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
ArrayBindingPattern : [ Elisionopt BindingRestElement ]
1. If Elision is present, then
a. Let status be the result of performing
IteratorDestructuringAssignmentEvaluation of Elision with
iteratorRecord as the argument.
b. ReturnIfAbrupt(status).
2. Return the result of performing IteratorBindingInitialization for
BindingRestElement with iteratorRecord and environment as arguments.
features: [generators]
---*/
//- setup
var iter = (function*() { throw new Test262Error(); })();
//- elems
[, ...x]
//- vals
iter
//- error
Test262Error