summary refs log tree commit diff stats
path: root/tests/closure
diff options
context:
space:
mode:
Diffstat (limited to 'tests/closure')
-rw-r--r--tests/closure/tclosure_issues.nim23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/closure/tclosure_issues.nim b/tests/closure/tclosure_issues.nim
index d9416e554..4688834de 100644
--- a/tests/closure/tclosure_issues.nim
+++ b/tests/closure/tclosure_issues.nim
@@ -1,6 +1,10 @@
 discard """
   output: '''true
-(999, 0)'''
+(999, 0)
+ok 0
+ok 1
+ok 2
+'''
 """
 
 
@@ -60,4 +64,19 @@ proc foo(): proc =
   return proc(): (int, int) =
     return (a, 0)
 
-echo foo()()
\ No newline at end of file
+echo foo()()
+
+
+block tissue7104:
+  proc sp(cb: proc())=
+      cb()
+
+  sp:
+      var i = 0
+      echo "ok ", i
+      sp():
+          inc i
+          echo "ok ", i
+          sp do:
+              inc i
+              echo "ok ", i