summary refs log tree commit diff stats
path: root/compiler/semasgn.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semasgn.nim')
-rw-r--r--compiler/semasgn.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/semasgn.nim b/compiler/semasgn.nim
index 835da55ac..857c9a1e0 100644
--- a/compiler/semasgn.nim
+++ b/compiler/semasgn.nim
@@ -320,6 +320,7 @@ proc liftTypeBoundOps*(c: PContext; typ: PType; info: TLineInfo) =
   ## to ensure we lift assignment, destructors and moves properly.
   ## The later 'destroyer' pass depends on it.
   if not newDestructors or not hasDestructor(typ): return
+  let typ = typ.skipTypes({tyGenericInst, tyAlias})
   # we generate the destructor first so that other operators can depend on it:
   if typ.destructor == nil: liftBody(c, typ, attachedDestructor, info)
   if typ.assignment == nil: liftBody(c, typ, attachedAsgn, info)