Files
Nim/lib
Sloane Simmons aa0d65ed70 Fix CountTableRef#getOrDefault
Fixes issue with CountTableRef and getOrDefault:
```{nimrod}
import tables

proc main() =
  const testKey = "TESTKEY"
  let t: CountTableRef[string] = newCountTable[string]()

  # Before, does not compile with error message:
  #test_counttable.nim(7, 43) template/generic instantiation from here
  #lib/pure/collections/tables.nim(117, 21) template/generic instantiation from here
  #lib/pure/collections/tableimpl.nim(32, 27) Error: undeclared field: 'hcode'

  echo "Count of " & testKey & " is " & $t.getOrDefault(testKey)
  t.inc(testKey,3)
  echo "Count of " & testKey & " is " & $t.getOrDefault(testKey)

when isMainModule:
  main()
```

Previously, `getOrDefault` for CountTableRef objects was calling the
`getOrDefaultImpl` template, which used the t.data.hcode object -
assuming a Table or similar object.  Because CountTableRef didn't have
an hcode in its data tuples, this wouldn't compile.  Changed to be the
same as `CountTable#getOrDefault`.
2016-01-09 21:46:47 -06:00
..
2015-10-12 20:58:46 +02:00
2015-11-25 19:27:13 +02:00
2015-10-02 16:00:33 -07:00
2016-01-09 21:46:47 -06:00
2015-12-17 14:39:40 +01:00
2013-03-16 23:53:07 +01:00
2014-08-28 09:59:26 +02:00
2015-12-08 00:48:24 +08:00