allow tuples and procs in 'toTask' + minor things (#22530)

This commit is contained in:
Andreas Rumpf
2023-08-22 21:01:08 +02:00
committed by GitHub
parent a26ccb3476
commit 6b04d0395a
2 changed files with 3 additions and 3 deletions

View File

@@ -173,7 +173,7 @@ macro toTask*(e: typed{nkCall | nkInfix | nkPrefix | nkPostfix | nkCommand | nkC
# passing by static parameters
# so we pass them directly instead of passing by scratchObj
callNode.add nnkExprEqExpr.newTree(formalParams[i][0], e[i])
of nnkSym, nnkPtrTy:
of nnkSym, nnkPtrTy, nnkProcTy, nnkTupleConstr:
addAllNode(param, e[i])
of nnkCharLit..nnkNilLit:
callNode.add nnkExprEqExpr.newTree(formalParams[i][0], e[i])