summary refs log tree commit diff stats
path: root/tests/closure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-06-26 23:41:20 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-06-26 23:41:20 +0200
commit135fdde6a9108591fa4c921bd0ad37179b10cc02 (patch)
treef8496c8badbbb2d5dd70f7d87c2cfd9937de67c6 /tests/closure
parent19b142401c9c7eece2cab7539ef626dc52a156fd (diff)
downloadNim-135fdde6a9108591fa4c921bd0ad37179b10cc02.tar.gz
fixes #11523
Diffstat (limited to 'tests/closure')
-rw-r--r--tests/closure/tclosure_issues.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/closure/tclosure_issues.nim b/tests/closure/tclosure_issues.nim
index b2d77c571..d9416e554 100644
--- a/tests/closure/tclosure_issues.nim
+++ b/tests/closure/tclosure_issues.nim
@@ -1,5 +1,6 @@
 discard """
-  output: '''true'''
+  output: '''true
+(999, 0)'''
 """
 
 
@@ -52,3 +53,11 @@ block tissue1911:
     proc baz() : int = helper()
 
     return (bar, baz)
+
+# bug #11523
+proc foo(): proc =
+  let a = 999
+  return proc(): (int, int) =
+    return (a, 0)
+
+echo foo()()
\ No newline at end of file