diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-24 21:37:59 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-24 21:37:59 +0200 |
commit | be22071b2e4c4233f074132b48f1687051fb2fd9 (patch) | |
tree | 261ab951eb23b7fba720f62b0228780b555da525 /compiler | |
parent | 6bbb25f2d7be66b67545c7d52b8f7f67ad56f88f (diff) | |
download | Nim-be22071b2e4c4233f074132b48f1687051fb2fd9.tar.gz |
fixes a varargs of untyped regression
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index e4eaeb903..7a5aa8dbb 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1622,6 +1622,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode, while a < n.len: if a >= formalLen-1 and formal != nil and formal.typ.isVarargsUntyped: + incl(marker, formal.position) if container.isNil: container = newNodeIT(nkBracket, n.sons[a].info, arrayConstr(c, n.info)) setSon(m.call, formal.position + 1, container) @@ -1684,6 +1685,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode, # beware of the side-effects in 'prepareOperand'! So only do it for # varargs matching. See tests/metatype/tstatic_overloading. m.baseTypeMatch = false + incl(marker, formal.position) n.sons[a] = prepareOperand(c, formal.typ, n.sons[a]) var arg = paramTypesMatch(m, formal.typ, n.sons[a].typ, n.sons[a], nOrig.sons[a]) |