mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 23:03:36 +00:00
fixes #888
This commit is contained in:
@@ -1451,7 +1451,7 @@ proc paramTypesMatchAux(m: var TCandidate, f, argType: PType,
|
||||
if skipTypes(f, abstractVar-{tyTypeDesc}).kind in {tyTuple}:
|
||||
result = implicitConv(nkHiddenSubConv, f, arg, m, c)
|
||||
of isNone:
|
||||
# do not do this in ``typeRel`` as it then can't infere T in ``ref T``:
|
||||
# do not do this in ``typeRel`` as it then can't infer T in ``ref T``:
|
||||
if a.kind in {tyProxy, tyUnknown}:
|
||||
inc(m.genericMatches)
|
||||
m.fauxMatch = a.kind
|
||||
@@ -1472,6 +1472,7 @@ proc paramTypesMatchAux(m: var TCandidate, f, argType: PType,
|
||||
m.baseTypeMatch = true
|
||||
else:
|
||||
result = userConvMatch(c, m, base(f), a, arg)
|
||||
if result != nil: m.baseTypeMatch = true
|
||||
|
||||
proc paramTypesMatch*(m: var TCandidate, f, a: PType,
|
||||
arg, argOrig: PNode): PNode =
|
||||
|
||||
18
tests/converter/tconverter_with_varargs.nim
Normal file
18
tests/converter/tconverter_with_varargs.nim
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
# bug #888
|
||||
|
||||
type
|
||||
PyRef = object
|
||||
PPyRef* = ref PyRef
|
||||
|
||||
converter to_py*(i: int) : PPyRef = nil
|
||||
|
||||
when false:
|
||||
proc to_tuple*(vals: openarray[PPyRef]): PPyRef =
|
||||
discard
|
||||
|
||||
proc abc(args: varargs[PPyRef]) =
|
||||
#let args_tup = to_tuple(args)
|
||||
discard
|
||||
|
||||
abc(1, 2)
|
||||
Reference in New Issue
Block a user