diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-03-23 15:47:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 15:47:10 +0100 |
commit | fc5dd11b3da555a3617c1163dc3105973d101b97 (patch) | |
tree | e0322a3d5c5bcba7b58f2d314eabd99d4d637217 /compiler/injectdestructors.nim | |
parent | e05fd1d00fb940aa89fdd7bd9f98e091abfd378b (diff) | |
download | Nim-fc5dd11b3da555a3617c1163dc3105973d101b97.tar.gz |
fixes #13722 (#13729)
* fixes #13722 * better fix
Diffstat (limited to 'compiler/injectdestructors.nim')
-rw-r--r-- | compiler/injectdestructors.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 743bf9e23..29199aa41 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -616,7 +616,7 @@ proc pVarScoped(v: PNode; c: var Con; ri, res: PNode) = # unpacked tuple needs reset at every loop iteration res.add newTree(nkFastAsgn, v, genDefaultCall(v.typ, c, v.info)) elif {sfGlobal, sfThread} * v.sym.flags == {sfGlobal}: - c.graph.globalDestructors.add genDestroy(c, v) + c.graph.globalDestructors.add genDestroy(c, v) else: # We always translate 'var v = f()' into bitcopies. If 'v' is in a loop, # the destruction at the loop end will free the resources. Other assignments |