sestoft / C5

C5 generic collection library for C#/.NET
http://www.itu.dk/research/c5/
MIT License
1.03k stars 181 forks source link

TreeBag.Add does not work after snapshot #14

Closed sestoft closed 11 years ago

sestoft commented 11 years ago

Originally submitted by Erik Meijer, Microsoft, on 20120422. Complicated-looking code using TreeBag and snapshots failed, data structure was inconsistent with tree.size and root.size disagreeing.

Investigations show that Add has never been able to increased item multiplicity beyond 1, because the assignment "root = cursor;" had been left out in the addIterative method of the Bag version of the tree data structure. Fixed on github.