diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-01-02 17:55:18 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-01-02 17:55:18 +0200 |
commit | 02533c260b16ce7b16a47781d104b46b36544749 (patch) | |
tree | c22094e2c5993cd8be11cbe467cab97b4a49cd80 /compiler/semstmts.nim | |
parent | 8e0941576fc30643a4cdcb532e180d0ca973ed85 (diff) | |
download | Nim-02533c260b16ce7b16a47781d104b46b36544749.tar.gz |
fixed #597
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 2 |
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: |