mark runTest() as "fastcall"

to get proper error messages about variable access that would make it a
closure - which we can't have in a spawned proc. "nimcall" doesn't work
here, because of https://github.com/nim-lang/Nim/issues/8473
This commit is contained in:
Ștefan Talpalaru 2019-05-29 12:49:33 +02:00
parent 65f6fb7ef2
commit 37d4ee81df
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 4 additions and 1 deletions

View File

@ -578,7 +578,10 @@ template test*(name, body) =
# `gensym` can't be in here because it's not a first-class pragma
when paralleliseTests:
{.pragma: testrunner, gcsafe.}
# We use "fastcall" to get proper error messages about variable access that
# would make runTest() a closure - which we can't have in a spawned proc.
# "nimcall" doesn't work here, because of https://github.com/nim-lang/Nim/issues/8473
{.pragma: testrunner, gcsafe, fastcall.}
else:
{.pragma: testrunner.}