Can't add same element to cleared map #22139
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/b906a74650
Reproduction Steps
Run the code above. It will panic on the last assert()
Expected Behavior
There should be no panic.
ints[3] = 3
should add an element to the cleared (empty) map, but it does not.Current Behavior
Output:
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.7 217b191
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: