Skip to content

Commit

Permalink
close #5859 by adding a test
Browse files Browse the repository at this point in the history
  • Loading branch information
narimiran committed May 29, 2019
1 parent 6904f32 commit d1b4f10
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/iter/titer13.nim
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,14 @@ block:
yield 4
for a in myIter2():
echo a

block t5859:
proc flatIterator[T](s: openarray[T]): auto {.noSideEffect.}=
result = iterator(): auto =
when (T is not seq|array):
for item in s:
yield item
else:
yield 123456
# issue #5859
let it = flatIterator(@[@[1,2], @[3,4]])

0 comments on commit d1b4f10

Please sign in to comment.