minor bugfix for transf pass after lambda-lifting
This commit is contained in:
parent
73279aba39
commit
c04e17aea3
1 changed files with 20 additions and 17 deletions
|
|
@ -139,7 +139,7 @@ proc transformVarSection(c: PTransf, v: PNode): PTransNode =
|
|||
if it.kind == nkCommentStmt:
|
||||
result[i] = PTransNode(it)
|
||||
elif it.kind == nkIdentDefs:
|
||||
if it.sons[0].kind != nkSym: internalError(it.info, "transformVarSection")
|
||||
if it.sons[0].kind == nkSym:
|
||||
internalAssert(it.len == 3)
|
||||
var newVar = copySym(it.sons[0].sym)
|
||||
incl(newVar.flags, sfFromGeneric)
|
||||
|
|
@ -156,6 +156,9 @@ proc transformVarSection(c: PTransf, v: PNode): PTransNode =
|
|||
defs[2] = transform(c, it.sons[2])
|
||||
newVar.ast = defs[2].PNode
|
||||
result[i] = defs
|
||||
else:
|
||||
# has been transformed into 'param.x' for closure iterators, so keep it:
|
||||
result[i] = PTransNode(it)
|
||||
else:
|
||||
if it.kind != nkVarTuple:
|
||||
internalError(it.info, "transformVarSection: not nkVarTuple")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue