Files
Nim/tests/async/t9201.nim
2018-10-09 15:53:13 +02:00

15 lines
291 B
Nim

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")