summary refs log tree commit diff stats
path: root/tests/iter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/iter')
-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