Files
Nim/tests/stdlib/t20023.nim
Bung 3ad2e7df1c fix #20023 hash for generic tables (#20346)
* fix #20023 hash for generic tables

* use default computation

* Update lib/pure/collections/tables.nim

Co-authored-by: Dan Rose <dan@digilabs.io>

* Update lib/pure/collections/tables.nim

Co-authored-by: Dan Rose <dan@digilabs.io>

* Update lib/pure/collections/tables.nim

* Update lib/pure/collections/tables.nim

* Update t20023.nim

---------

Co-authored-by: Dan Rose <dan@digilabs.io>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-06-21 12:19:40 +02:00

11 lines
210 B
Nim

import std/[tables, hashes, assertions]
let t = ()
var a = toTable({t:t})
del(a,t)
let b = default(typeof(a))
doAssert a==b , "tables are not equal"
doAssert hash(a) == hash(b), "table hashes are not equal"