mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
@@ -1746,8 +1746,8 @@ proc matches*(c: PContext, n, nOrig: PNode, m: var TCandidate) =
|
||||
if formal.ast == nil:
|
||||
if formal.typ.kind == tyVarargs:
|
||||
var container = newNodeIT(nkBracket, n.info, arrayConstr(c, n.info))
|
||||
addSon(m.call, implicitConv(nkHiddenStdConv, formal.typ,
|
||||
container, m, c))
|
||||
setSon(m.call, formal.position + 1,
|
||||
implicitConv(nkHiddenStdConv, formal.typ, container, m, c))
|
||||
else:
|
||||
# no default value
|
||||
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)
|
||||
Reference in New Issue
Block a user