fixes #15038 [backport:1.2]
This commit is contained in:
parent
624762cfb7
commit
aae998feff
3 changed files with 29 additions and 46 deletions
|
|
@ -840,6 +840,8 @@ proc track(tracked: PEffects, n: PNode) =
|
|||
useVar(tracked, n)
|
||||
if n.sym.typ != nil and tfHasAsgn in n.sym.typ.flags:
|
||||
tracked.owner.flags.incl sfInjectDestructors
|
||||
# bug #15038: ensure consistency
|
||||
if not hasDestructor(n.typ): n.typ = n.sym.typ
|
||||
of nkHiddenAddr, nkAddr:
|
||||
if n[0].kind == nkSym and isLocalVar(tracked, n[0].sym):
|
||||
useVarNoInitCheck(tracked, n[0], n[0].sym)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue