Return nil from genOtherArg after error.

This commit is contained in:
Matthew Baulch 2016-07-05 23:16:57 +10:00
commit a2301f64cd

View file

@ -262,7 +262,9 @@ proc genOtherArg(p: BProc; ri: PNode; i: int; typ: PType): Rope =
else: else:
if tfVarargs notin typ.flags: if tfVarargs notin typ.flags:
localError(ri.info, "wrong argument count") localError(ri.info, "wrong argument count")
result = genArgNoParam(p, ri.sons[i]) result = nil
else:
result = genArgNoParam(p, ri.sons[i])
discard """ discard """
Dot call syntax in C++ Dot call syntax in C++