diff options
author | Araq <rumpf_a@web.de> | 2019-07-01 12:28:52 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-07-01 12:29:03 +0200 |
commit | 413dff03a085b61d5247d3a200c878d6ee2dc522 (patch) | |
tree | 5407eedc7a11f6f00479446eaeda6135a4eb281d /compiler/injectdestructors.nim | |
parent | a5686961bda5ecaa36d45bb2f95701977d62df4d (diff) | |
download | Nim-413dff03a085b61d5247d3a200c878d6ee2dc522.tar.gz |
fixes #11614
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 61f47cdfe..ef65e788f 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -498,7 +498,7 @@ proc pArg(arg: PNode; c: var Con; isSink: bool): PNode = # to disable the destructor which we have not elided sinkParamIsLastReadCheck(c, arg) result = destructiveMoveVar(arg, c) - elif arg.kind == nkSym and arg.sym.kind in InterestingSyms and isLastRead(arg, c): + elif isAnalysableFieldAccess(arg, c.owner) and isLastRead(arg, c): # it is the last read, can be sinked. We need to reset the memory # to disable the destructor which we have not elided result = destructiveMoveVar(arg, c) |