Fix bug with asyncdispatch.async and discard statements.

This commit is contained in:
Philip Witte 2015-05-20 03:34:48 -07:00
commit c936cf9e8e

View file

@ -1328,7 +1328,7 @@ proc processBody(node, retFutureSym: NimNode,
else: discard else: discard
of nnkDiscardStmt: of nnkDiscardStmt:
# discard await x # discard await x
if node[0].kind != nnkEmpty and node[0][0].kind == nnkIdent and if node[0].kind == nnkCommand and node[0][0].kind == nnkIdent and
node[0][0].ident == !"await": node[0][0].ident == !"await":
var newDiscard = node var newDiscard = node
result.createVar("futureDiscard_" & $toStrLit(node[0][1]), node[0][1], result.createVar("futureDiscard_" & $toStrLit(node[0][1]), node[0][1],