summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-08 18:05:36 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-08 18:05:36 +0200
commitd83eb7064345ae09df927eedf53b4661a2341ffa (patch)
tree4742a8e685b35597779bac8c2c874d89cdd73444 /lib
parentd9e44873ab4a61f79aee33c54ed56656c5446cb7 (diff)
downloadNim-d83eb7064345ae09df927eedf53b4661a2341ffa.tar.gz
async: use -d:nimDumpAsync to see what the async macro generates
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/asyncdispatch.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index f47bfeee3..15d9ab02e 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -1898,7 +1898,7 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
 
   # -> createCb(retFuture)
   #var cbName = newIdentNode("cb")
-  var procCb = newCall(bindSym"createCb", retFutureSym, iteratorNameSym,
+  var procCb = getAst createCb(retFutureSym, iteratorNameSym,
                        newStrLitNode(prc[0].getName))
   outerProcBody.add procCb
 
@@ -1933,6 +1933,8 @@ macro async*(prc: stmt): stmt {.immediate.} =
       result.add asyncSingleProc(oneProc)
   else:
     result = asyncSingleProc(prc)
+  when defined(nimDumpAsync):
+    echo repr result
 
 proc recvLine*(socket: AsyncFD): Future[string] {.async.} =
   ## Reads a line of data from ``socket``. Returned future will complete once