diff options
author | Hans Raaf <hara@oderwat.de> | 2015-02-21 23:20:02 +0100 |
---|---|---|
committer | Hans Raaf <hara@oderwat.de> | 2015-02-21 23:20:02 +0100 |
commit | 93aa73284eb22f6ed2f48920685e640829de1f3e (patch) | |
tree | f089294569f41bd8c75d486690d613cddf20c5ef /lib/pure/collections/tables.nim | |
parent | ef44fd344bcaa2083766448c0974d4ffe3c09c33 (diff) | |
download | Nim-93aa73284eb22f6ed2f48920685e640829de1f3e.tar.gz |
Fix unknown symbol in tables mpairs iterator.
Fixes an error with mpairs iterator which was introduced with 5fbcf93860. This is used by nimforum thats why I found it. I also added a testcase for the mpairs iterator.
Diffstat (limited to 'lib/pure/collections/tables.nim')
-rw-r--r-- | lib/pure/collections/tables.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index c75386cf1..959688d6a 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -104,7 +104,7 @@ iterator mpairs*[A, B](t: var Table[A, B]): tuple[key: A, val: var B] = ## iterates over any (key, value) pair in the table `t`. The values ## can be modified. for h in 0..high(t.data): - if isFilled(t.data[h].slot): yield (t.data[h].key, t.data[h].val) + if isFilled(t.data[h].hcode): yield (t.data[h].key, t.data[h].val) iterator keys*[A, B](t: Table[A, B]): A = ## iterates over any key in the table `t`. |