* fixes #12882
This commit is contained in:
cooldome 2019-12-13 11:24:05 +00:00 • committed by GitHub
commit 1e1fd73530
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -99,7 +99,7 @@ proc genTraverseProc(c: TTraversalClosure, accessor: Rope, typ: PType) =
of tyRef:
lineCg(p, cpsStmts, visitorFrmt, [accessor, c.visitorFrmt])
of tySequence:
if tfHasAsgn notin typ.flags:
if optSeqDestructors notin c.p.module.config.globalOptions:
lineCg(p, cpsStmts, visitorFrmt, [accessor, c.visitorFrmt])
elif containsGarbageCollectedRef(typ.lastSon):
# destructor based seqs are themselves not traced but their data is, if