summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run/tclosure.nim12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/run/tclosure.nim b/tests/run/tclosure.nim
index 372e296d0..d9e7b8ee4 100755
--- a/tests/run/tclosure.nim
+++ b/tests/run/tclosure.nim
@@ -34,6 +34,14 @@ myData.each do (x: int):
 
 #OUT 2 4 6 8 10
 
-
-
+type
+  ITest = tuple[
+    setter: proc(v: Int),
+    getter: proc(): int]
+
+proc getInterf(): ITest =
+  var shared: int
+  
+  return (setter: proc (x) = shared = x,
+          getter: proc (): int = return shared)