lift parameter-less do block to lambdas
This commit is contained in:
parent
f7b10e213b
commit
a3f19c87fb
10 changed files with 46 additions and 26 deletions
|
|
@ -1599,8 +1599,7 @@ proc setupMacroParam(x: PNode, typ: PType): TFullReg =
|
|||
putIntoReg(result, x)
|
||||
else:
|
||||
result.kind = rkNode
|
||||
var n = if typ.kind in {tyStmt,tyExpr} and x.kind == nkDo: x[bodyPos]
|
||||
else: x
|
||||
var n = x
|
||||
if n.kind in {nkHiddenSubConv, nkHiddenStdConv}: n = n.sons[1]
|
||||
n = n.canonValue
|
||||
n.flags.incl nfIsRef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue