aboutsummaryrefslogtreecommitdiffstats
path: root/src/arguments/args-trailing-comma-null.case
blob: 1eb48aa0f36942182c0718ecefb8ec64f33bb8b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: A trailing comma after null should not increase the arguments.length
template: default
esid: prod-Arguments
info: |
    Trailing comma in the arguments list

    12.3 Left-Hand-Side Expressions

    Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
---*/

//- args
42, null,
//- body
assert.sameValue(arguments.length, 2);
assert.sameValue(arguments[0], 42);
assert.sameValue(arguments[1], null);