Merge pull request #51 from status-im/fix-error

Fixed compilation error for async lambdas
This commit is contained in:
Eugene Kabanov 2019-08-19 20:44:51 +03:00 committed by GitHub
commit 6d7864aa84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,7 +249,8 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
# -> return retFuture
outerProcBody.add newNimNode(nnkReturnStmt, prc.body[^1]).add(retFutureSym)
prc.addPragma(newColonExpr(ident "stackTrace", ident "off"))
if prc.kind != nnkLambda: # TODO: Nim bug?
prc.addPragma(newColonExpr(ident "stackTrace", ident "off"))
result = prc