fix #15750
This commit is contained in:
parent
f8cac6bbbc
commit
b13fb9ddb8
2 changed files with 8 additions and 0 deletions
|
|
@ -1619,6 +1619,8 @@ proc `==`*[A, B](s, t: OrderedTable[A, B]): bool =
|
|||
|
||||
if s.counter != t.counter:
|
||||
return false
|
||||
if s.counter == 0 and t.counter == 0:
|
||||
return true
|
||||
var ht = t.first
|
||||
var hs = s.first
|
||||
while ht >= 0 and hs >= 0:
|
||||
|
|
|
|||
|
|
@ -456,3 +456,9 @@ block testNonPowerOf2:
|
|||
var b = initTable[int, int](9)
|
||||
b[1] = 10
|
||||
assert b[1] == 10
|
||||
|
||||
block emptyOrdered:
|
||||
var t1: OrderedTable[int, string]
|
||||
var t2: OrderedTable[int, string]
|
||||
assert t1 == t2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue