diff options
Diffstat (limited to 'compiler/semdestruct.nim')
-rw-r--r-- | compiler/semdestruct.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semdestruct.nim b/compiler/semdestruct.nim index 9ea581f3a..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, {tyConst, tyMutable}).skipGenericAlias + var t = typ.skipGenericAlias let typeHoldingUserDefinition = if t.kind == tyGenericInst: t.base else: t if typeHoldingUserDefinition.destructor != nil: |