diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 713867b766..cd7428b627 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1278,8 +1278,7 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) = incl st.flags, tfRefsAnonObj let obj = newSym(skType, getIdent(c.cache, s.name.s & ":ObjectType"), nextId c.idgen, getCurrOwner(c), s.info) - obj.ast = a.copyTree - obj.ast[0] = newSymNode(obj) + obj.ast = a if sfPure in s.flags: obj.flags.incl sfPure obj.typ = st.lastSon