count arguments.
Parameters
number
required
The exact argument count. Must be a whole number of
0 or more.Properties
number
The required count. Writable.
Behavior
- Explicit
nilcounts. Callingf(1, nil)passes two arguments, so it matchesArgCountFilter.new(2)and notArgCountFilter.new(1). - Namecalls include the object. Inside a
__namecall,obj:Method(a)counts as two arguments, because the object itself is argument1.
Example
Errors
Related
ArgumentFilter: match a particular argument’s value.