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

@ -260,7 +260,11 @@ 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:
result = genArgNoParam(p, ri.sons[i]) if tfVarargs notin typ.flags:
localError(ri.info, "wrong argument count")
result = nil
else:
result = genArgNoParam(p, ri.sons[i])
discard """ discard """
Dot call syntax in C++ Dot call syntax in C++