Pure ref object; fixes #10721 (#10955)

This commit is contained in:
Arne Döring 2019-04-04 09:06:12 +02:00 • committed by Andreas Rumpf
commit 65ee80e50c
2 changed files with 43 additions and 8 deletions

View file

@ -1203,6 +1203,8 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
incl st.flags, tfRefsAnonObj
let obj = newSym(skType, getIdent(c.cache, s.name.s & ":ObjectType"),
getCurrOwner(c), s.info)
if sfPure in s.flags:
obj.flags.incl sfPure
obj.typ = st.lastSon
st.lastSon.sym = obj