Can someone help me understand what is going on here. The first getOrDefault works but not the second and how can the second be fixed. Everything I have tried fails.
type
FooTable = Table[string, int]
Bar = Table[FooTable, float]
let bars = { { "b": 0 }.toTable: 0.99, { "b": 1 }.toTable: 0.01 }.toTable
echo getOrDefault(bars, {"b": 0 }.toTable ) # WORKS
var ft: FooTable = initTable[string, int]()
ft["b"] = 0
echo getOrDefault(bars, ft ) # FAILS
Thanks. I just updated my devel to the latest version and it works! I was using
1.9.5 git hash: 2054f1c3a9c78ac13593e90845807e9e64f22553
but I am now on
1.95 git hash: 9ddd768cce291e5c562cde23baeeefb47aa79c86.