Return nil from genOtherArg after error.

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

View File

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