diff options
author | Andy Davidoff <disruptek@users.noreply.github.com> | 2020-03-08 05:55:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-08 10:55:19 +0100 |
commit | a693ce776557371a159c074d1d3f55683114a03a (patch) | |
tree | 1c8c13447cf3148a5a5ffa45a4ad901e48940e99 /compiler/rodimpl.nim | |
parent | eae31a7f8d5f26bbfc27c3f0746a583154d451c9 (diff) | |
download | Nim-a693ce776557371a159c074d1d3f55683114a03a.tar.gz |
surgical fix for #13319 (#13604)
Diffstat (limited to 'compiler/rodimpl.nim')
-rw-r--r-- | compiler/rodimpl.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rodimpl.nim b/compiler/rodimpl.nim index 7a0f6fcef..8ee7ae564 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) |