summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-17 22:04:40 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-17 22:04:40 +0200
commit35c8b5e3bcc13ade6441f1b53ee8d3acacffded3 (patch)
treeca864971f79b15ce7e3c5b4e67012f9e67b9a9f0 /compiler/semtypinst.nim
parente7f37d7223920939cda1a206cc84efee41952437 (diff)
downloadNim-35c8b5e3bcc13ade6441f1b53ee8d3acacffded3.tar.gz
destructors: irresponsibly simple tcustomseq test works
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r--compiler/semtypinst.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 5d0f0177c..3b99ea562 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -363,7 +363,10 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType =
         # '=' needs to be instantiated for generics when the type is constructed:
         newbody.field = cl.c.instTypeBoundOp(cl.c, opr, result, cl.info,
                                              attachedAsgn, 1)
-    if not newDestructors: typeBound(assignment)
+    if newDestructors:
+      typeBound(destructor)
+      typeBound(sink)
+    typeBound(assignment)
     let methods = skipTypes(bbody, abstractPtrs).methods
     for col, meth in items(methods):
       # we instantiate the known methods belonging to that type, this causes