DFA: We are not allowed to take ownership of parameters
This commit is contained in:
parent
5bdab044f5
commit
850e90ac30
1 changed files with 2 additions and 1 deletions
|
|
@ -633,7 +633,8 @@ proc isAnalysableFieldAccess*(n: PNode; owner: PSym): bool =
|
||||||
break
|
break
|
||||||
# XXX Allow closure deref operations here if we know
|
# XXX Allow closure deref operations here if we know
|
||||||
# the owner controlled the closure allocation?
|
# the owner controlled the closure allocation?
|
||||||
result = n.kind == nkSym and n.sym.owner == owner and owner.kind != skModule
|
result = n.kind == nkSym and n.sym.owner == owner and
|
||||||
|
owner.kind != skModule and (n.sym.kind != skParam or isSinkParam(n.sym))
|
||||||
|
|
||||||
proc genDef(c: var Con; n: PNode) =
|
proc genDef(c: var Con; n: PNode) =
|
||||||
if n.kind == nkSym and n.sym.kind in InterestingSyms:
|
if n.kind == nkSym and n.sym.kind in InterestingSyms:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue