Skip to content

Commit

Permalink
fixes #22866; fixes #19998; ensure destruction for ObjConstr
Browse files Browse the repository at this point in the history
fixes #22866;
fixes #19998
  • Loading branch information
ringabout committed Nov 1, 2023
1 parent 40e33de commit 1151e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/injectdestructors.nim
Expand Up @@ -857,7 +857,7 @@ proc p(n: PNode; c: var Con; s: var Scope; mode: ProcessMode; tmpFlags = {sfSing
result[i][1] = p(n[i][1], c, s, m)
else:
result[i] = p(n[i], c, s, m)
if mode == normal and isRefConstr:
if mode == normal and hasDestructor(c, n.typ):
result = ensureDestruction(result, n, c, s)
of nkCallKinds:
if n[0].kind == nkSym and n[0].sym.magic == mEnsureMove:
Expand Down

0 comments on commit 1151e76

Please sign in to comment.