From 159a2ff955e7160bbb9b80c8048efea4826363e6 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 4 Jan 2016 02:04:59 +0100 Subject: fixes #3636 --- tests/iter/twrap_walkdir.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/iter/twrap_walkdir.nim (limited to 'tests/iter') diff --git a/tests/iter/twrap_walkdir.nim b/tests/iter/twrap_walkdir.nim new file mode 100644 index 000000000..4ac487d8e --- /dev/null +++ b/tests/iter/twrap_walkdir.nim @@ -0,0 +1,16 @@ + + + +import os + +# bug #3636 + +proc fooIt(foo: string): iterator(): (string) = + iterator temp(): (string) = + for f in walkDirRec(foo): # No problem with walkFiles + yield f + return temp + +let it = fooIt(".") +for x in it(): + echo x -- cgit 1.4.1-2-gfad0