diff options
author | alaviss <alaviss@users.noreply.github.com> | 2018-10-09 20:53:13 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-09 15:53:13 +0200 |
commit | 2a31f42d35121e12dfbef368ce9d5d1751aa1376 (patch) | |
tree | d09dabe7ae346f69499c3959e69f58548c74d8b7 /tests/async | |
parent | 8a1055adcea8847e1cb2fae87c84d06afa3198b1 (diff) | |
download | Nim-2a31f42d35121e12dfbef368ce9d5d1751aa1376.tar.gz |
asyncmacro: add nnkSym support for getName() (#9204)
Fixes #9201
Diffstat (limited to 'tests/async')
-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") |