From 2bab2a2cd8476423414819db3ad79309f6033e13 Mon Sep 17 00:00:00 2001 From: "Andrey R (cooldome)" Date: Tue, 24 Nov 2020 11:58:02 +0000 Subject: [PATCH] fix #16110 --- compiler/semstmts.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index cd7428b627..713867b766 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1278,7 +1278,8 @@ 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 + obj.ast = a.copyTree + obj.ast[0] = newSymNode(obj) if sfPure in s.flags: obj.flags.incl sfPure obj.typ = st.lastSon