'let' within 'parallel' now works
This commit is contained in:
parent
1a3b730bf5
commit
8930ba50b9
4 changed files with 21 additions and 6 deletions
|
|
@ -335,7 +335,7 @@ proc analyse(c: var AnalysisCtx; n: PNode) =
|
|||
localError(n.info, "invalid control flow for 'parallel'")
|
||||
# 'break' that leaves the 'parallel' section is not valid either
|
||||
# or maybe we should generate a 'try' XXX
|
||||
of nkVarSection:
|
||||
of nkVarSection, nkLetSection:
|
||||
for it in n:
|
||||
let value = it.lastSon
|
||||
if value.kind != nkEmpty:
|
||||
|
|
@ -396,7 +396,7 @@ proc transformSpawnSons(owner: PSym; n, barrier: PNode): PNode =
|
|||
|
||||
proc transformSpawn(owner: PSym; n, barrier: PNode): PNode =
|
||||
case n.kind
|
||||
of nkVarSection:
|
||||
of nkVarSection, nkLetSection:
|
||||
result = nil
|
||||
for it in n:
|
||||
let b = it.lastSon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue