owned refs must be moved

This commit is contained in:
Andreas Rumpf 2019-03-07 12:48:59 +01:00
commit 5b1a2eecd5
4 changed files with 8 additions and 27 deletions

View file

@ -1793,7 +1793,7 @@ when false:
for i in 0 ..< n.safeLen:
if n[i].containsNil: return true
template hasDestructor*(t: PType): bool = tfHasAsgn in t.flags
template hasDestructor*(t: PType): bool = {tfHasAsgn, tfHasOwned} * t.flags != {}
template incompleteType*(t: PType): bool =
t.sym != nil and {sfForward, sfNoForward} * t.sym.flags == {sfForward}