diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-02-09 11:18:21 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-09 11:18:21 +0100 |
commit | c6fdf93c7fb136864aa873945409ddfc74228596 (patch) | |
tree | ead91f3008fd0b4722882e4700ccfe5fe066c2ca /tests/effects/tgcsafe.nim | |
parent | 3c909ae8ff27048f5ba04023dd620a10b05428a7 (diff) | |
download | Nim-c6fdf93c7fb136864aa873945409ddfc74228596.tar.gz |
fixes #6955
Diffstat (limited to 'tests/effects/tgcsafe.nim')
-rw-r--r-- | tests/effects/tgcsafe.nim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/effects/tgcsafe.nim b/tests/effects/tgcsafe.nim index ff207df59..363624f19 100644 --- a/tests/effects/tgcsafe.nim +++ b/tests/effects/tgcsafe.nim @@ -1,9 +1,18 @@ discard """ errormsg: "'mainUnsafe' is not GC-safe" - line: 17 + line: 26 cmd: "nim $target --hints:on --threads:on $options $file" """ +# bug #6955 +var global_proc: proc(a: string): int {.nimcall.} = nil + +proc myproc(i: int) {.gcsafe.} = + if global_proc != nil: + echo "a" + if isNil(global_proc): + return + proc mymap(x: proc ()) = x() |