forked from Mirror/wren
Previously, you could get into a state where a key was present in the map, but after a tombstone in the probe sequence. If they key was added again, it stopped at the first tombstone and added it there, resulting in the key being in the map multiple times. Fix #373.
10 lines
174 B
Plaintext
10 lines
174 B
Plaintext
// Regression test for #373.
|
|
var map = {}
|
|
map[2] = "two"
|
|
map[0] = "zero"
|
|
map.remove(2)
|
|
map[0] = "zero again"
|
|
map.remove(0)
|
|
|
|
System.print(map.containsKey(0)) // expect: false
|