t10913.nim 381 B

123456789101112131415161718192021
  1. discard """
  2. matrix: "--mm:refc; --mm:orc"
  3. errormsg: "'spawn'ed function cannot have a 'typed' or 'untyped' parameter"
  4. """
  5. # bug #10913
  6. import threadpool
  7. proc useParallel*[T](unused: T) =
  8. # use a generic T here to show the problem.
  9. {.push experimental: "parallel".}
  10. parallel:
  11. for i in 0..4:
  12. spawn echo "echo in parallel"
  13. sync()
  14. {.pop.}
  15. useParallel(1)