summary refs log tree commit diff stats
path: root/compiler/semobjconstr.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-07-24 00:30:02 +0200
committerGitHub <noreply@github.com>2021-07-24 00:30:02 +0200
commitf4ff276a90091f2b88c191aac5a201dcb3ec9795 (patch)
tree06bbed631d7f76ff4de97179631d6701f3e4afc3 /compiler/semobjconstr.nim
parentcc0f02d57d4f95908df5bf82c3612ed3726c84d4 (diff)
downloadNim-f4ff276a90091f2b88c191aac5a201dcb3ec9795.tar.gz
refactoring: removed dead code (#18567)
Diffstat (limited to 'compiler/semobjconstr.nim')
-rw-r--r--compiler/semobjconstr.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim
index 16e3c6cee..1c97d32c8 100644
--- a/compiler/semobjconstr.nim
+++ b/compiler/semobjconstr.nim
@@ -222,8 +222,7 @@ proc semConstructFields(c: PContext, n: PNode,
           valsDiff.renderAsType(n[0].typ)])
 
       let branchNode = n[selectedBranch]
-      let flags = flags*{efAllowDestructor} + {efPreferStatic,
-                                               efPreferNilResult}
+      let flags = {efPreferStatic, efPreferNilResult}
       var discriminatorVal = semConstrField(c, flags,
                                             discriminator.sym,
                                             constrCtx.initExpr)
@@ -436,6 +435,6 @@ proc semObjConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
 
   if initResult == initFull:
     incl result.flags, nfAllFieldsSet
-  
+
   # wrap in an error see #17437
   if hasError: result = errorNode(c, result)