diff options
author | Matthew Baulch <baulch.matt@gmail.com> | 2016-07-05 06:14:36 +1000 |
---|---|---|
committer | Matthew Baulch <baulch.matt@gmail.com> | 2016-07-05 06:14:36 +1000 |
commit | 9a7b6af5fab3dc418ca4e63e071f3764ec1b73de (patch) | |
tree | 2619901e690cd53069a095251405d214ef6ed450 | |
parent | 5f9da6b2ae137feb762c149ed5a7e0eb0f23a17d (diff) | |
download | Nim-9a7b6af5fab3dc418ca4e63e071f3764ec1b73de.tar.gz |
Report wrong arg count when too many params and no varargs.
-rw-r--r-- | compiler/ccgcalls.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index bd17f85e4..879b57423 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -260,6 +260,8 @@ proc genOtherArg(p: BProc; ri: PNode; i: int; typ: PType): Rope = else: result = genArgNoParam(p, ri.sons[i]) #, typ.n.sons[i].sym) else: + if tfVarargs notin typ.flags: + localError(ri.info, "wrong argument count") result = genArgNoParam(p, ri.sons[i]) discard """ |