summary refs log tree commit diff stats
path: root/compiler/liftdestructors.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/liftdestructors.nim')
-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