blob: 267dca0311c9400ac155f8832b5999d2a9922fe8 [file] [log] [blame] [edit]
// 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
info: |
Trailing comma in the arguments list
Left-Hand-Side Expressions
Arguments :
( )
( ArgumentList )
( ArgumentList , )
ArgumentList :
AssignmentExpression
... AssignmentExpression
ArgumentList , AssignmentExpression
ArgumentList , ... AssignmentExpression
---*/
//- args
42, null,
//- body
assert.sameValue(arguments.length, 2);
assert.sameValue(arguments[0], 42);
assert.sameValue(arguments[1], null);