Merge pull request #4444 from mbaulch/devel

Fix #4275: Argument count not checked in importcpp
This commit is contained in:
Andreas Rumpf 2016-07-05 17:42:36 +02:00 • committed by GitHub
commit b439e3b4d9

View file

@ -259,6 +259,10 @@ proc genOtherArg(p: BProc; ri: PNode; i: int; typ: PType): Rope =
result = genArgNoParam(p, ri.sons[i][0]) result = genArgNoParam(p, ri.sons[i][0])
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:
if tfVarargs notin typ.flags:
localError(ri.info, "wrong argument count")
result = nil
else: else:
result = genArgNoParam(p, ri.sons[i]) result = genArgNoParam(p, ri.sons[i])