summary refs log tree commit diff stats
path: root/tests/parallel/t10913.nim
blob: d8459ecd0c458602a94b8a312e19328b9901890c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
discard """
  matrix: "--threads:on"
  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)