p[] instead of p^

This commit is contained in:
Araq 2011-04-11 21:42:28 +02:00
commit 3d696c3da5
12 changed files with 64 additions and 52 deletions

16
tests/reject/titer2.nim Executable file
View file

@ -0,0 +1,16 @@
discard """
file: "titer2.nim"
msg: "internal error: not implemented: pass to var parameter"
"""
# Try to break the transformation pass:
iterator iterAndZero(a: var openArray[int]): int =
for i in 0..len(a)-1:
yield a[i]
a[i] = 0
var x = [[1, 2, 3], [4, 5, 6]]
for y in iterAndZero(x[0]): write(stdout, $y)
#OUT 123