parent
8a1055adce
commit
2a31f42d35
2 changed files with 15 additions and 1 deletions
14
tests/async/t9201.nim
Normal file
14
tests/async/t9201.nim
Normal file
|
|
@ -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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue