summary refs log tree commit diff stats
path: root/tests/js/t7109.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/t7109.nim')
-rw-r--r--tests/js/t7109.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/js/t7109.nim b/tests/js/t7109.nim
new file mode 100644
index 000000000..a1a3b718e
--- /dev/null
+++ b/tests/js/t7109.nim
@@ -0,0 +1,8 @@
+iterator iter*(): int {.closure.} =
+  yield 3
+
+var x = iter
+doAssert x() == 3
+
+let fIt = iterator(): int = yield 70
+doAssert fIt() == 70