diff options
author | flywind <xzsflywind@gmail.com> | 2021-04-21 23:53:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 17:53:31 +0200 |
commit | 4471141a1d68158f3f23c6584d1f0434807c0203 (patch) | |
tree | f3d09db76936f5e198f6d3ccbe50825ed577cc5d /tests/parallel | |
parent | 8f79bc5f3dfdfd13ef6be1fbcb300872931801f8 (diff) | |
download | Nim-4471141a1d68158f3f23c6584d1f0434807c0203.tar.gz |
fix #7535(Poor error message for spawn when a procedure (without calling it)) (#17774)
Diffstat (limited to 'tests/parallel')
-rw-r--r-- | tests/parallel/t7535.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/parallel/t7535.nim b/tests/parallel/t7535.nim new file mode 100644 index 000000000..a6bc0dabe --- /dev/null +++ b/tests/parallel/t7535.nim @@ -0,0 +1,11 @@ +discard """ + matrix: "--threads:on" + errormsg: "'spawn' takes a call expression; got proc (x: uint32) = echo [x]" +""" + +import threadpool + +# bug #7535 +proc print_parallel_nok(r: uint32) = + for x in 0..r: + spawn (proc (x: uint32) = echo x) |