summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-01-04 02:04:59 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-01-04 02:04:59 +0100
commit159a2ff955e7160bbb9b80c8048efea4826363e6 (patch)
tree6b88c006e1b391c6367907d791b5fb553bec5a89 /tests
parent8fb6865b245a9fb027c5fac16c4d242f48f2f8ef (diff)
downloadNim-159a2ff955e7160bbb9b80c8048efea4826363e6.tar.gz
fixes #3636
Diffstat (limited to 'tests')
-rw-r--r--tests/iter/twrap_walkdir.nim16
1 files changed, 16 insertions, 0 deletions
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