progress on deepCopy
This commit is contained in:
parent
821fe72ff5
commit
9673e4f2df
19 changed files with 419 additions and 135 deletions
|
|
@ -125,8 +125,7 @@ proc instantiateDestructor(c: PContext, typ: PType): PType =
|
|||
# The destructor is either user-defined or automatically
|
||||
# generated by the compiler in a member-wise fashion.
|
||||
var t = skipTypes(typ, {tyConst, tyMutable}).skipGenericAlias
|
||||
let typeHoldingUserDefinition = if t.kind == tyGenericInst: t.base
|
||||
else: t
|
||||
let typeHoldingUserDefinition = if t.kind == tyGenericInst: t.base else: t
|
||||
|
||||
if typeHoldingUserDefinition.destructor != nil:
|
||||
# XXX: This is not entirely correct for recursive types, but we need
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue