From a693ce776557371a159c074d1d3f55683114a03a Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Sun, 8 Mar 2020 05:55:19 -0400 Subject: [PATCH] surgical fix for #13319 (#13604) --- compiler/rodimpl.nim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/rodimpl.nim b/compiler/rodimpl.nim index 7a0f6fcef8d99..8ee7ae56418c5 100644 --- a/compiler/rodimpl.nim +++ b/compiler/rodimpl.nim @@ -667,7 +667,7 @@ proc loadType(g; id: int; info: TLineInfo): PType = rawAddSon(result, nil) else: let d = decodeVInt(b.s, b.pos) - rawAddSon(result, loadType(g, d, info)) + result.sons.add loadType(g, d, info) proc decodeLib(g; b; info: TLineInfo): PLib = result = nil @@ -719,10 +719,8 @@ proc loadSymFromBlob(g; b; info: TLineInfo): PSym = else: internalError(g.config, info, "decodeSym: no ident") #echo "decoding: {", ident.s - new(result) - result.id = id - result.kind = k - result.name = ident # read the rest of the symbol description: + result = PSym(id: id, kind: k, name: ident) + # read the rest of the symbol description: g.incr.r.syms.add(result.id, result) if b.s[b.pos] == '^': inc(b.pos)