diff options
Diffstat (limited to 'tests/async/t9201.nim')
-rw-r--r-- | tests/async/t9201.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/async/t9201.nim b/tests/async/t9201.nim new file mode 100644 index 000000000..5aaba7063 --- /dev/null +++ b/tests/async/t9201.nim @@ -0,0 +1,14 @@ +discard """ + exitcode: 0 +""" + +# Derived from issue #9201 +import asyncdispatch, macros + +macro newAsyncProc(name: untyped): untyped = + expectKind name, nnkStrLit + let pName = genSym(nskProc, name.strVal) + result = getAst async quote do: + proc `pName`() = discard + +newAsyncProc("hello") |