summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-06-07 08:11:48 +0200
committerGitHub <noreply@github.com>2018-06-07 08:11:48 +0200
commit3a6b1f0ba0525a4cf86c854d7bd4d9fc048c59e5 (patch)
tree0e531f6877859bf8122c5df74eb39442f5e749e0 /tests
parentbf394ed1a1d27d8d38d4bc386946e3442736cd75 (diff)
parentfef60716bfbae0f0eda8cf976d5cd4b61f1c5fdd (diff)
downloadNim-3a6b1f0ba0525a4cf86c854d7bd4d9fc048c59e5.tar.gz
Merge pull request #7977 from yglukhov/yield-in-blockexpr
Fixed yield in nkBlockExpr
Diffstat (limited to 'tests')
-rw-r--r--tests/iter/tyieldintry.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/iter/tyieldintry.nim b/tests/iter/tyieldintry.nim
index c9e5843b8..3c07736e1 100644
--- a/tests/iter/tyieldintry.nim
+++ b/tests/iter/tyieldintry.nim
@@ -393,4 +393,19 @@ block: #7969
 
   test(it, 1, 2, 3)
 
+block: # yield in blockexpr
+  type
+    SomeObj = object
+      id: int
+
+  iterator it(): int {.closure.} =
+    yield(block:
+      checkpoint(1)
+      yield 2
+      3
+    )
+
+  test(it, 1, 2, 3)
+
+
 echo "ok"