After clear(), a map allows double entries #22143
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/fe9eccd7aa
Reproduction Steps
Run the code above.
Expected Behavior
The last line should show 2 entries only,
Current Behavior
Output:
The last line says there are 3 entries now; but the entry "20" is twice in the map. This only happens after calling clear().
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.7 673ac0a
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: