Report wrong arg count when too many params and no varargs.

This commit is contained in:
Matthew Baulch
2016-07-05 06:14:36 +10:00
parent 5f9da6b2ae
commit 9a7b6af5fa

View File

@@ -260,6 +260,8 @@ proc genOtherArg(p: BProc; ri: PNode; i: int; typ: PType): Rope =
else:
result = genArgNoParam(p, ri.sons[i]) #, typ.n.sons[i].sym)
else:
if tfVarargs notin typ.flags:
localError(ri.info, "wrong argument count")
result = genArgNoParam(p, ri.sons[i])
discard """