mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-18 17:08:32 +00:00
Fix bug with asyncdispatch.async and discard statements.
This commit is contained in:
@@ -1328,7 +1328,7 @@ proc processBody(node, retFutureSym: NimNode,
|
||||
else: discard
|
||||
of nnkDiscardStmt:
|
||||
# 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":
|
||||
var newDiscard = node
|
||||
result.createVar("futureDiscard_" & $toStrLit(node[0][1]), node[0][1],
|
||||
|
||||
Reference in New Issue
Block a user