Merge pull request #4444 from mbaulch/devel
Fix #4275: Argument count not checked in importcpp
This commit is contained in:
commit
b439e3b4d9
1 changed files with 5 additions and 1 deletions
|
|
@ -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])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue