Merge pull request #4391 from edubart/fix-await

Fix #4390
This commit is contained in:
Dominik Picheta 2016-06-21 23:52:27 +01:00 • committed by GitHub
commit 6b334770b5

View file

@ -1707,7 +1707,7 @@ proc processBody(node, retFutureSym: NimNode,
of nnkCommand, nnkCall: of nnkCommand, nnkCall:
if node[0].kind == nnkIdent and node[0].ident == !"await": if node[0].kind == nnkIdent and node[0].ident == !"await":
case node[1].kind case node[1].kind
of nnkIdent, nnkInfix: of nnkIdent, nnkInfix, nnkDotExpr:
# await x # await x
# await x or y # await x or y
result = newNimNode(nnkYieldStmt, node).add(node[1]) # -> yield x result = newNimNode(nnkYieldStmt, node).add(node[1]) # -> yield x