destructors: supportsCopyMem finally works for recursive types

This commit is contained in:
Araq 2017-10-25 08:39:56 +02:00
commit 3aa7c2232e
6 changed files with 53 additions and 18 deletions

View file

@ -2299,7 +2299,8 @@ proc instTypeBoundOp*(c: PContext; dc: PSym; t: PType; info: TLineInfo;
localError(info, errGenerated, "cannot instantiate '" & dc.name.s & "'")
else:
result = c.semGenerateInstance(c, dc, m.bindings, info)
assert sfFromGeneric in result.flags
if op == attachedDeepCopy:
assert sfFromGeneric in result.flags
include suggest