summary refs log tree commit diff stats
path: root/compiler/lambdalifting.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-06-12 10:44:37 +0200
committerAraq <rumpf_a@web.de>2019-06-12 10:44:45 +0200
commitb056d32a7932aa96efd3c3f731d342282c5aba63 (patch)
treee7a082e38398de9fdcc0698fe3c9a54ed2fe0dec /compiler/lambdalifting.nim
parente4d0f4fee0d154c6af90b160d615be17034ffcdc (diff)
downloadNim-b056d32a7932aa96efd3c3f731d342282c5aba63.tar.gz
[refactoring] liftdestructors.nim is callable from lambdalifting; refs #11217
Diffstat (limited to 'compiler/lambdalifting.nim')
-rw-r--r--compiler/lambdalifting.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index e2d1a143f..9ea6d4f02 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -12,7 +12,7 @@
 import
   intsets, strutils, options, ast, astalgo, trees, treetab, msgs,
   idents, renderer, types, magicsys, lowerings, tables, modulegraphs, lineinfos,
-  transf
+  transf, liftdestructors
 
 discard """
   The basic approach is that captured vars need to be put on the heap and
@@ -583,6 +583,11 @@ proc rawClosureCreation(owner: PSym;
     #             oldenv, env.info))
     else:
       localError(d.graph.config, env.info, "internal error: cannot create up reference")
+  # we are not in the sem'check phase anymore! so pass 'nil' for the PContext
+  # and hope for the best:
+  when false:
+    if optNimV2 in d.graph.config.globalOptions:
+      createTypeBoundOps(d.graph, nil, env.typ, owner.info)
 
 proc closureCreationForIter(iter: PNode;
                             d: DetectionPass; c: var LiftingPass): PNode =