function.go: if the right most parameter is repeteable (pfRepeat), then it does not increment the min-arg count
This commit is contained in:
parent
c04678c426
commit
e4b4b4fb79
@ -168,6 +168,7 @@ func newFuncInfo(name string, functor Functor, returnType string, params []ExprF
|
|||||||
return nil, fmt.Errorf("can't specify non-optional param after optional ones: %q", p.Name())
|
return nil, fmt.Errorf("can't specify non-optional param after optional ones: %q", p.Name())
|
||||||
}
|
}
|
||||||
if p.IsRepeat() {
|
if p.IsRepeat() {
|
||||||
|
minArgs--
|
||||||
maxArgs = -1
|
maxArgs = -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user