fixes #1067
This commit is contained in:
parent
0257f389fe
commit
c9563d28a8
1 changed files with 9 additions and 0 deletions
|
|
@ -37,6 +37,15 @@ proc genVarTuple(p: BProc, n: PNode) =
|
||||||
var tup, field: TLoc
|
var tup, field: TLoc
|
||||||
if n.kind != nkVarTuple: internalError(n.info, "genVarTuple")
|
if n.kind != nkVarTuple: internalError(n.info, "genVarTuple")
|
||||||
var L = sonsLen(n)
|
var L = sonsLen(n)
|
||||||
|
|
||||||
|
# if we have a something that's been captured, use the lowering instead:
|
||||||
|
var useLowering = false
|
||||||
|
for i in countup(0, L-3):
|
||||||
|
if n[i].kind != nkSym:
|
||||||
|
useLowering = true; break
|
||||||
|
if useLowering:
|
||||||
|
genStmts(p, lowerTupleUnpacking(n, p.prc))
|
||||||
|
return
|
||||||
genLineDir(p, n)
|
genLineDir(p, n)
|
||||||
initLocExpr(p, n.sons[L-1], tup)
|
initLocExpr(p, n.sons[L-1], tup)
|
||||||
var t = tup.t
|
var t = tup.t
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue