expected-argument-count.js (569B)
1 // Copyright (C) 2014 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 14.1.6 5 description: > 6 The ExpectedArgumentCount of a FormalParameterList is the number of 7 FormalParameters to the left of either the rest parameter or the first 8 FormalParameter with an Initializer. 9 ---*/ 10 function af(...a) {} 11 function bf(a, ...b) {} 12 13 assert.sameValue(af.length, 0, "The value of `af.length` is `0`"); 14 assert.sameValue(bf.length, 1, "The value of `bf.length` is `1`"); 15 16 reportCompare(0, 0);