ARC related bugfixes and refactorings (#12781)

This commit is contained in:
Andreas Rumpf 2019-12-05 16:59:06 +01:00 • committed by Miran
commit 3fbb3bfd3f
11 changed files with 381 additions and 367 deletions

View file

@ -307,6 +307,8 @@ proc instCopyType*(cl: var TReplTypeVars, t: PType): PType =
if not (t.kind in tyMetaTypes or
(t.kind == tyStatic and t.n == nil)):
result.flags.excl tfInstClearedFlags
else:
result.flags.excl tfHasAsgn
when false:
if newDestructors:
result.assignment = nil
@ -380,7 +382,7 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType =
for i in 1..<t.len:
# if one of the params is not concrete, we cannot do anything
# but we already raised an error!
rawAddSon(result, header[i])
rawAddSon(result, header[i], propagateHasAsgn = false)
if body.kind == tyError:
return