Files
Nim/tests/parallel/t10913.nim
ringabout 4fa86422c0 stdlib tests now check refc too (#21664)
* stdlib tests now check refc too

* typo

* fixes line numbers

* disable cpp

* do not touch
2023-04-21 15:37:58 +02:00

21 lines
381 B
Nim

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