M(
Size: a a a
M(
M(
VB
M(
M(
M(
proc test(data: openArray[int]): proc() =
result = proc =
echo data
let a = @[1, 2, 3]
test(a)()
M(
/home/dian/Projects/ircord/third.nim(9, 10) Error: 'data' is of type <openArray[int]> which cannot be captured as it would violate memory safety, declared here: /home/dian/Projects/ircord/third.nim(7, 11); using '-d:nimWorkaround14447' helps in some cases
M(
M(
import std/asyncdispatch
proc test(data: openArray[int]) {.async.} =
echo data
waitFor test(@[1, 2, 3])
M(
/home/dian/Projects/ircord/third.nim(5, 8) Error: 'data' is of type <openArray[int]> which cannot be captured as it would violate memory safety, declared here: /home/dian/Projects/ircord/third.nim(4, 11); using '-d:nimWorkaround14447' helps in some cases
M(
M(
proc test(): int =
let other = proc() =
result = 5
discard test()
M(
/home/dian/Projects/ircord/third.nim(4, 5) Error: 'result' is of type <int> which cannot be captured as it would violate memory safety, declared here: /home/dian/Projects/ircord/third.nim(1, 1); using '-d:nimWorkaround14447' helps in some cases
M(
M(
M(
VB
M(
M(
M(