Report wrong arg count when too many params and no varargs.
This commit is contained in:
parent
5f9da6b2ae
commit
9a7b6af5fa
1 changed files with 2 additions and 0 deletions
|
|
@ -260,6 +260,8 @@ proc genOtherArg(p: BProc; ri: PNode; i: int; typ: PType): Rope =
|
||||||
else:
|
else:
|
||||||
result = genArgNoParam(p, ri.sons[i]) #, typ.n.sons[i].sym)
|
result = genArgNoParam(p, ri.sons[i]) #, typ.n.sons[i].sym)
|
||||||
else:
|
else:
|
||||||
|
if tfVarargs notin typ.flags:
|
||||||
|
localError(ri.info, "wrong argument count")
|
||||||
result = genArgNoParam(p, ri.sons[i])
|
result = genArgNoParam(p, ri.sons[i])
|
||||||
|
|
||||||
discard """
|
discard """
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue