parent
65c7884a3c
commit
2039e3e883
2 changed files with 21 additions and 7 deletions
|
|
@ -207,6 +207,9 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
|
|||
futureVarIdents)
|
||||
# don't do anything with forward bodies (empty)
|
||||
if procBody.kind != nnkEmpty:
|
||||
# fix #13899, defer should not escape its original scope
|
||||
procBody = newStmtList(newTree(nnkBlockStmt, newEmptyNode(), procBody))
|
||||
|
||||
procBody.add(createFutureVarCompletions(futureVarIdents, nil))
|
||||
|
||||
if not subtypeIsVoid:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue