varargs[untyped] actually works
This commit is contained in:
parent
560cfd48fc
commit
bbf7e18e5b
1 changed files with 6 additions and 1 deletions
|
|
@ -1512,7 +1512,12 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
|
|||
|
||||
while a < n.len:
|
||||
if a >= formalLen-1 and formal != nil and formal.typ.isVarargsUntyped:
|
||||
discard
|
||||
if container.isNil:
|
||||
container = newNodeIT(nkBracket, n.sons[a].info, arrayConstr(c, n.info))
|
||||
setSon(m.call, formal.position + 1, container)
|
||||
else:
|
||||
incrIndexType(container.typ)
|
||||
addSon(container, n.sons[a])
|
||||
elif n.sons[a].kind == nkExprEqExpr:
|
||||
# named param
|
||||
# check if m.callee has such a param:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue