finally got rid of nkPassAsOpenArray
This commit is contained in:
parent
f3007cbd72
commit
b0742c5b27
12 changed files with 50 additions and 72 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue