summaryrefslogtreecommitdiff
path: root/src/function-forms/dflt-params-ref-later.case
blob: c5931045d99d606db135b4d982bd9401d3906a80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Referencing a parameter that occurs later in the ParameterList
template: error
info: |
  14.1.19 Runtime Semantics: IteratorBindingInitialization

  FormalsList : FormalsList , FormalParameter

  1. Let status be the result of performing IteratorBindingInitialization for
     FormalsList using iteratorRecord and environment as the arguments.
  2. ReturnIfAbrupt(status).
  3. Return the result of performing IteratorBindingInitialization for
     FormalParameter using iteratorRecord and environment as the arguments.
features: [default-parameters]
---*/

//- setup
var x = 0;
//- params
x = y, y
//- error
ReferenceError