diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-10 00:40:34 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-10 00:40:34 +0100 |
commit | 2e280eafa8b13802980cf0e2f309342742e61347 (patch) | |
tree | ff06081d75caa000e57c36e0848cc9cf6eace286 /rod | |
parent | 7dff3e64bbb44cfc57314038c2c047f2ccb1da1e (diff) | |
download | Nim-2e280eafa8b13802980cf0e2f309342742e61347.tar.gz |
bugfix: tseqtuple
Diffstat (limited to 'rod')
-rwxr-xr-x | rod/transf.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rod/transf.nim b/rod/transf.nim index 7bc39dc74..ac746f834 100755 --- a/rod/transf.nim +++ b/rod/transf.nim @@ -191,7 +191,7 @@ proc newTupleAccess(tup: PNode, i: int): PNode = proc unpackTuple(c: PTransf, n, father: PNode) = # XXX: BUG: what if `n` is an expression with side-effects? - for i in countup(0, sonsLen(n) - 1): + for i in countup(0, sonsLen(c.transCon.forStmt) - 3): addSon(father, newAsgnStmt(c, c.transCon.forStmt.sons[i], transform(c, newTupleAccess(n, i)))) @@ -439,8 +439,7 @@ proc gatherVars(c: PTransf, n: PNode, marked: var TIntSet, owner: PSym, case s.kind of skVar: found = not (sfGlobal in s.flags) of skTemp, skForVar, skParam: found = true - else: - nil + else: nil if found and (owner.id != s.owner.id) and not IntSetContainsOrIncl(marked, s.id): incl(s.flags, sfInClosure) |