progress on deepCopy

This commit is contained in:
Araq 2014-08-01 23:40:48 +02:00
commit 9673e4f2df
19 changed files with 419 additions and 135 deletions

View file

@ -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