diff options
author | Araq <rumpf_a@web.de> | 2017-10-14 22:12:23 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-10-14 22:35:20 +0200 |
commit | 9af94803404963ad7cb5969c8321ec0a526939d8 (patch) | |
tree | 9181b4cbf705c8eb5b20c8c6d88c592f1f70063f /tests/effects | |
parent | 5768eaa2fdc92ffbb1ba767a09da8bef3968c40e (diff) | |
download | Nim-9af94803404963ad7cb5969c8321ec0a526939d8.tar.gz |
fixes #5620
Diffstat (limited to 'tests/effects')
-rw-r--r-- | tests/effects/tgcsafe2.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/effects/tgcsafe2.nim b/tests/effects/tgcsafe2.nim new file mode 100644 index 000000000..dbc4540c4 --- /dev/null +++ b/tests/effects/tgcsafe2.nim @@ -0,0 +1,12 @@ +discard """ + errormsg: ''' (proc (s: string) = res &= &(s, "abc"), nil) is not GC safe''' + line: 11 +""" +#5620 +var res = "" + +proc takeCallback(foo: (proc(s: string) {.gcsafe.})) = + foo "string" + +takeCallback(proc (s: string) = + res &= s & "abc") |