summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorMatthew Baulch <baulch.matt@gmail.com>2016-07-05 23:16:57 +1000
committerMatthew Baulch <baulch.matt@gmail.com>2016-07-05 23:16:57 +1000
commita2301f64cdbb0efaf88dc4f5398c53ef95ba4a57 (patch)
treee8dc0eecf8b5aab78a306705f5b617eddf3df2fc /compiler
parent9a7b6af5fab3dc418ca4e63e071f3764ec1b73de (diff)
downloadNim-a2301f64cdbb0efaf88dc4f5398c53ef95ba4a57.tar.gz
Return nil from genOtherArg after error.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgcalls.nim4
1 files changed, 3 insertions, 1 deletions
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++