Fixes #5995
This commit is contained in:
parent
d947753523
commit
58eae1171d
3 changed files with 5 additions and 2 deletions
|
|
@ -301,7 +301,7 @@ proc verifyReturnType(typeName: string) {.compileTime.} =
|
|||
proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
|
||||
## This macro transforms a single procedure into a closure iterator.
|
||||
## The ``async`` macro supports a stmtList holding multiple async procedures.
|
||||
if prc.kind notin {nnkProcDef, nnkLambda, nnkMethodDef}:
|
||||
if prc.kind notin {nnkProcDef, nnkLambda, nnkMethodDef, nnkDo}:
|
||||
error("Cannot transform this node kind into an async proc." &
|
||||
" proc/method definition or lambda node expected.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue