From a2301f64cdbb0efaf88dc4f5398c53ef95ba4a57 Mon Sep 17 00:00:00 2001 From: Matthew Baulch Date: Tue, 5 Jul 2016 23:16:57 +1000 Subject: Return nil from genOtherArg after error. --- compiler/ccgcalls.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/ccgcalls.nim') diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index 879b57423..bd1a4101a 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -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++ -- cgit 1.4.1-2-gfad0