next steps for tyVarargs/tyOpenArray split

This commit is contained in:
Araq 2012-08-14 08:44:26 +02:00
commit 51de278bd4
13 changed files with 44 additions and 31 deletions

View file

@ -467,7 +467,7 @@ proc foldConv*(n, a: PNode): PNode =
else:
result = a
result.typ = n.typ
of tyOpenArray, tyProc:
of tyOpenArray, tyVarargs, tyProc:
nil
else:
result = a
@ -588,7 +588,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
result = newIntNodeT(firstOrd(n.sons[1].typ), n)
of mHigh:
if skipTypes(n.sons[1].typ, abstractVar).kind notin
{tyOpenArray, tySequence, tyString}:
{tyOpenArray, tyVarargs, tySequence, tyString}:
result = newIntNodeT(lastOrd(skipTypes(n[1].typ, abstractVar)), n)
else:
var a = getArrayConstr(m, n.sons[1])