summary refs log tree commit diff stats
path: root/compiler/semdestruct.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semdestruct.nim')
-rw-r--r--compiler/semdestruct.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semdestruct.nim b/compiler/semdestruct.nim
index efaa2b7cf..85d106056 100644
--- a/compiler/semdestruct.nim
+++ b/compiler/semdestruct.nim
@@ -124,7 +124,7 @@ proc instantiateDestructor(c: PContext, typ: PType): PType =
   # destructor that must be used for the varialbe.
   # The destructor is either user-defined or automatically
   # generated by the compiler in a member-wise fashion.
-  var t = skipTypes(typ, {tyMutable}).skipGenericAlias
+  var t = typ.skipGenericAlias
   let typeHoldingUserDefinition = if t.kind == tyGenericInst: t.base else: t
 
   if typeHoldingUserDefinition.destructor != nil: