summary refs log tree commit diff stats
path: root/tests/closure/tboehmdeepcopy.nim
blob: 7c937ca107c80ea7f7823021209b05df53e86731 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()