diff options
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r-- | compiler/transf.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim index abe713eb8..dae8d1ee6 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -1060,6 +1060,8 @@ proc transformExpr*(g: ModuleGraph; module: PSym, n: PNode): PNode = var c = openTransf(g, module, "") result = processTransf(c, n, module) liftDefer(c, result) + # expressions are not to be injected with destructor calls as that + # the list of top level statements needs to be collected before. if c.needsDestroyPass: result = injectDestructorCalls(g, module, result) incl(result.flags, nfTransf) |