fixes #6955
This commit is contained in:
parent
49a5213713
commit
f55d094cf2
2 changed files with 17 additions and 4 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue