* fix varargs forwarding for templates; fixes #5455 * document the macros' varargs change in the news for 0.16.2
This commit is contained in:
parent
d59441340d
commit
650b20dc5e
3 changed files with 42 additions and 2 deletions
|
|
@ -1651,7 +1651,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
|
|||
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))
|
||||
container = newNodeIT(nkArgList, n.sons[a].info, arrayConstr(c, n.info))
|
||||
setSon(m.call, formal.position + 1, container)
|
||||
else:
|
||||
incrIndexType(container.typ)
|
||||
|
|
@ -1739,7 +1739,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
|
|||
|
||||
if formal.typ.isVarargsUntyped:
|
||||
if container.isNil:
|
||||
container = newNodeIT(nkBracket, n.sons[a].info, arrayConstr(c, n.info))
|
||||
container = newNodeIT(nkArgList, n.sons[a].info, arrayConstr(c, n.info))
|
||||
setSon(m.call, formal.position + 1, container)
|
||||
else:
|
||||
incrIndexType(container.typ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue