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

@ -375,7 +375,6 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
n)
of mLengthOpenArray:
var a = n.sons[1]
if a.kind == nkPassAsOpenArray: a = a.sons[0]
if a.kind == nkBracket:
# we can optimize it away! This fixes the bug ``len(134)``.
result = newIntNodeT(sonsLen(a), n)