summary refs log tree commit diff stats
path: root/tests/async
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-02-16 19:56:17 +0000
committerDominik Picheta <dominikpicheta@googlemail.com>2014-02-16 19:56:17 +0000
commit17ef758cc3b08a19eb80e33fd26b5d3bafd22d4c (patch)
tree4f1a23759135b029f61e87e26f197a2de375f432 /tests/async
parentcac39b27cfd398058cb9b4315a2c61bb12f42446 (diff)
downloadNim-17ef758cc3b08a19eb80e33fd26b5d3bafd22d4c.tar.gz
Fix processing of 'await' with a nnkCall.
Specifically, ``discard readMessages(disp, await disp.accept(server))``
works now, i.e. using 'await' as one of the params to a proc call.
Diffstat (limited to 'tests/async')
-rw-r--r--tests/async/tasyncawait.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/async/tasyncawait.nim b/tests/async/tasyncawait.nim
index 84a4164d9..bcaffc287 100644
--- a/tests/async/tasyncawait.nim
+++ b/tests/async/tasyncawait.nim
@@ -52,8 +52,7 @@ proc createServer(disp: PDispatcher, port: TPort): PFuture[int] {.async.} =
   server.bindAddr(port)
   server.listen()
   while true:
-    var client = await disp.accept(server)
-    discard readMessages(disp, client)
+    discard readMessages(disp, await disp.accept(server))
 
 discard disp.createServer(TPort(10335))
 discard disp.launchSwarm(TPort(10335))