You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last)
test.nim(38) test
json.nim(990) $
json.nim(759) len
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Seems that it's from the len proc missing a nil check. The default when not given a jArray or jObject is to return 0, so I'd think it would be the same for nil.
import tables
var a = newTable[string,string]()
echo a["b"] #nil
var b = newTable[string,int]()
echo b["c"] #0
b["c"] = 0
echo b["c"] #0 - same result: is key exist with value 0 or it doesn't exist?
This results in SIGSEGV:
Is that ok? Why not exception?
The text was updated successfully, but these errors were encountered: