mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-27 00:51:39 +00:00
got rid of 'accept' dir in the tests
This commit is contained in:
16
tests/run/titervaropenarray.nim
Executable file
16
tests/run/titervaropenarray.nim
Executable file
@@ -0,0 +1,16 @@
|
||||
discard """
|
||||
file: "titer2.nim"
|
||||
output: "123"
|
||||
"""
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user