This commit is contained in:
Fanael Linithien 2020-11-12 09:28:32 +01:00 • committed by GitHub
commit 7d4f70280e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -399,6 +399,7 @@ proc allRoots(n: PNode; result: var seq[PSym]; followDotExpr = true) =
proc destMightOwn(c: var Partitions; dest: var VarIndex; n: PNode) =
## Analyse if 'n' is an expression that owns the data, if so mark 'dest'
## with 'ownsData'.
if n.typ == nil: return
case n.kind
of nkEmpty, nkCharLit..nkNilLit:
# primitive literals including the empty are harmless: