summary refs log tree commit diff stats
path: root/tests/closure/tboehmdeepcopy.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/closure/tboehmdeepcopy.nim')
-rw-r--r--tests/closure/tboehmdeepcopy.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/closure/tboehmdeepcopy.nim b/tests/closure/tboehmdeepcopy.nim
new file mode 100644
index 000000000..7c937ca10
--- /dev/null
+++ b/tests/closure/tboehmdeepcopy.nim
@@ -0,0 +1,18 @@
+discard """
+  cmd: "nim c --gc:boehm $options $file"
+  output: '''meep'''
+  disabled: "windows"
+"""
+
+proc callit(it: proc ()) =
+  it()
+
+proc main =
+  var outer = "meep"
+  proc x =
+    echo outer
+  var y: proc()
+  deepCopy(y, x)
+  callit(y)
+
+main()