tarc_misc.nim 325 B

12345678910111213141516171819202122
  1. discard """
  2. output: ''''''
  3. cmd: "nim c --gc:arc $file"
  4. """
  5. # bug #13519
  6. var unrelated: seq[proc() {.closure, gcsafe.}]
  7. unrelated.add proc () =
  8. echo "gcsafe"
  9. import tables, sequtils
  10. let t = newTable[int, proc()]()
  11. type
  12. MyProc = proc() {.closure.}
  13. var result: seq[MyProc] = @[]
  14. for x in t.values:
  15. result.add(x)