fixes #5620
This commit is contained in:
parent
5768eaa2fd
commit
9af9480340
2 changed files with 15 additions and 12 deletions
12
tests/effects/tgcsafe2.nim
Normal file
12
tests/effects/tgcsafe2.nim
Normal file
|
|
@ -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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue