After calling clear() on a map several times, duplicate keys are allowed #22145
Labels
Bug
This tag is applied to issues which reports bugs.
Modules: builtin
Bugs and problems, concerning the builtin types in V - array, maps, strings, runes.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
Describe the bug
Code: https://play.vlang.io/p/e1f1a32c15
Reproduction Steps
Run the code above
Expected Behavior
Map m and map n should always have the same number of elements.
Current Behavior
After around 8 iterations, map m begins to allow duplicate keys, which gets worse later on.
Output:
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.7 fc31b44
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: