summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2014-01-02 17:55:18 +0200
committerZahary Karadjov <zahary@gmail.com>2014-01-02 17:55:18 +0200
commit02533c260b16ce7b16a47781d104b46b36544749 (patch)
treec22094e2c5993cd8be11cbe467cab97b4a49cd80 /compiler/semstmts.nim
parent8e0941576fc30643a4cdcb532e180d0ca973ed85 (diff)
downloadNim-02533c260b16ce7b16a47781d104b46b36544749.tar.gz
fixed #597
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 80327e7eb..f0007d01e 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -86,7 +86,7 @@ include semdestruct
 
 proc semDestructorCheck(c: PContext, n: PNode, flags: TExprFlags) {.inline.} =
   if efAllowDestructor notin flags and n.kind in nkCallKinds+{nkObjConstr}:
-    if instantiateDestructor(c, n.typ):
+    if instantiateDestructor(c, n.typ) != nil:
       localError(n.info, errGenerated,
         "usage of a type with a destructor in a non destructible context")
   # This still breaks too many things: