summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-04-17 00:15:40 +0200
committerAraq <rumpf_a@web.de>2019-04-17 00:15:40 +0200
commitd8a8c8806f207fbd8bd525ae51c6d4a91988ad61 (patch)
treeccd93c0f6d6d105e6e3ebd04499e420c74eaf17b
parentce024a73bf9050a18b0cb7c6a985127c86ba14c7 (diff)
downloadNim-d8a8c8806f207fbd8bd525ae51c6d4a91988ad61.tar.gz
fixes #11014
-rw-r--r--compiler/liftdestructors.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/liftdestructors.nim b/compiler/liftdestructors.nim
index 8c89b2dad..310263875 100644
--- a/compiler/liftdestructors.nim
+++ b/compiler/liftdestructors.nim
@@ -650,9 +650,9 @@ proc createTypeBoundOps(c: PContext; orig: PType; info: TLineInfo) =
     inst(typ.sink, typ)
 
   if overwrite:
-    orig.destructor = canon.destructor
-    orig.assignment = canon.assignment
-    orig.sink = canon.sink
+    orig.destructor = typ.destructor
+    orig.assignment = typ.assignment
+    orig.sink = typ.sink
 
   if not isTrival(orig.destructor):
     #or not isTrival(orig.assignment) or