mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
* 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>
11 lines
210 B
Nim
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"
|