This PR adds a test for and fixes a logic bug in the Hashtbl. The clear operation replaced the internal buckets array with an empty array [||] and requested rehash of the table on the next mutation operation. Unfortunately there is of course no guarantee that the next operation is a mutation. This PR fixes that by simply creating the new buckets array directly in clear.
This PR adds a test for and fixes a logic bug in the
Hashtbl
. Theclear
operation replaced the internalbuckets
array with an empty array[||]
and requested rehash of the table on the next mutation operation. Unfortunately there is of course no guarantee that the next operation is a mutation. This PR fixes that by simply creating the new buckets array directly inclear
.Thanks to @Lucccyo for reporting the issue!