summary refs log tree commit diff stats
path: root/lib/core
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-06-20 07:40:45 +0200
committerGitHub <noreply@github.com>2019-06-20 07:40:45 +0200
commitc65a5d754b791dfad72420fa27cfe933c6a7782c (patch)
treeb146a231876a8351ba586912ee867c121ac6218c /lib/core
parent1a074fffa421b6cab0357e86d1011cc39eafcc61 (diff)
downloadNim-c65a5d754b791dfad72420fa27cfe933c6a7782c.tar.gz
[bugfix] owned closures (#11544)
Diffstat (limited to 'lib/core')
-rw-r--r--lib/core/runtime_v2.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/core/runtime_v2.nim b/lib/core/runtime_v2.nim
index 0165833b4..5689e3072 100644
--- a/lib/core/runtime_v2.nim
+++ b/lib/core/runtime_v2.nim
@@ -78,6 +78,13 @@ proc nimRawDispose(p: pointer) {.compilerRtl.} =
 proc nimDestroyAndDispose(p: pointer) {.compilerRtl.} =
   let d = cast[ptr PNimType](p)[].destructor
   if d != nil: cast[DestructorProc](d)(p)
+  when false:
+    cstderr.rawWrite cast[ptr PNimType](p)[].name
+    cstderr.rawWrite "\n"
+    if d == nil:
+      cstderr.rawWrite "bah, nil\n"
+    else:
+      cstderr.rawWrite "has destructor!\n"
   nimRawDispose(p)
 
 proc isObj(obj: PNimType, subclass: cstring): bool {.compilerproc.} =