commit
51c77e09fd
2 changed files with 8 additions and 2 deletions
|
|
@ -1746,8 +1746,8 @@ proc matches*(c: PContext, n, nOrig: PNode, m: var TCandidate) =
|
||||||
if formal.ast == nil:
|
if formal.ast == nil:
|
||||||
if formal.typ.kind == tyVarargs:
|
if formal.typ.kind == tyVarargs:
|
||||||
var container = newNodeIT(nkBracket, n.info, arrayConstr(c, n.info))
|
var container = newNodeIT(nkBracket, n.info, arrayConstr(c, n.info))
|
||||||
addSon(m.call, implicitConv(nkHiddenStdConv, formal.typ,
|
setSon(m.call, formal.position + 1,
|
||||||
container, m, c))
|
implicitConv(nkHiddenStdConv, formal.typ, container, m, c))
|
||||||
else:
|
else:
|
||||||
# no default value
|
# no default value
|
||||||
m.state = csNoMatch
|
m.state = csNoMatch
|
||||||
|
|
|
||||||
6
tests/overload/tissue4475.nim
Normal file
6
tests/overload/tissue4475.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Bug: https://github.com/nim-lang/Nim/issues/4475
|
||||||
|
# Fix: https://github.com/nim-lang/Nim/pull/4477
|
||||||
|
|
||||||
|
proc test(x: varargs[string], y: int) = discard
|
||||||
|
|
||||||
|
test(y = 1)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue