finally got rid of nkPassAsOpenArray

This commit is contained in:
Araq 2011-08-16 08:56:53 +02:00
commit b0742c5b27
12 changed files with 50 additions and 72 deletions

View file

@ -499,13 +499,13 @@ proc ParamTypesMatchAux(c: PContext, m: var TCandidate, f, a: PType,
result = copyTree(arg)
result.typ = getInstantiatedType(c, arg, m, f)
# BUG: f may not be the right key!
if (skipTypes(result.typ, abstractVar).kind in {tyTuple, tyOpenArray}):
if (skipTypes(result.typ, abstractVar).kind in {tyTuple}):
result = implicitConv(nkHiddenStdConv, f, copyTree(arg), m, c)
# BUGFIX: use ``result.typ`` and not `f` here
of isEqual:
inc(m.exactMatches)
result = copyTree(arg)
if (skipTypes(f, abstractVar).kind in {tyTuple, tyOpenArray}):
if (skipTypes(f, abstractVar).kind in {tyTuple}):
result = implicitConv(nkHiddenStdConv, f, copyTree(arg), m, c)
of isNone:
result = userConvMatch(c, m, f, a, arg)