added getOrDefault; bootstrapping works again
This commit is contained in:
parent
d8b0edc323
commit
2fda95a4d6
9 changed files with 52 additions and 40 deletions
|
|
@ -239,7 +239,7 @@ proc loadAny(p: var JsonParser, t: PType,
|
|||
result = newNode(nkNilLit)
|
||||
next(p)
|
||||
of jsonInt:
|
||||
result = tab[p.getInt]
|
||||
result = tab.getOrDefault(p.getInt)
|
||||
if result.isNil:
|
||||
raiseParseErr(p, "cannot load object with address " & $p.getInt)
|
||||
next(p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue