Fixed compilation error for async lambdas

This commit is contained in:
Yuriy Glukhov 2019-08-19 20:19:26 +03:00
parent 693f741c8d
commit aacfa59c76

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