ARC: fixes cycle detection and move the .cursor attribute into closures (#12872)

This commit is contained in:
Andreas Rumpf 2019-12-11 06:57:00 +01:00 • committed by GitHub
commit 3524944e21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 1 deletions

View file

@ -215,6 +215,7 @@ proc addField*(obj: PType; s: PSym; cache: IdentCache) =
assert t.kind != tyTyped
propagateToOwner(obj, t)
field.position = obj.n.len
field.flags = s.flags * {sfCursor}
obj.n.add newSymNode(field)
fieldCheck()