summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-22 15:59:47 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-22 17:30:17 +0200
commit75a981cf80cb9f4cdff83a6ff525f6428b3ab5f1 (patch)
treedf4871d616f9ed161d1893b5ddfcb78d9622b135 /lib/pure
parent6b5e2adfd08796eb73dbec479f3e40b22a366c98 (diff)
downloadNim-75a981cf80cb9f4cdff83a6ff525f6428b3ab5f1.tar.gz
Skip nested procedures in .async. macro
Fixes #3075
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/asyncmacro.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/asyncmacro.nim b/lib/pure/asyncmacro.nim
index 9e0893a4d..1a45fdac7 100644
--- a/lib/pure/asyncmacro.nim
+++ b/lib/pure/asyncmacro.nim
@@ -177,6 +177,9 @@ proc processBody(node, retFutureSym: NimNode,
       var newDiscard = node
       result.createVar("futureDiscard_" & $toStrLit(node[0][1]), node[0][1],
                 newDiscard[0], newDiscard, node)
+  of RoutineNodes:
+    # skip all the nested procedure definitions
+    return
   else: discard
 
   for i in 0 ..< result.len: