Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnrolledList: item inserted at wrong location after a remove #189

Open
dhananjays opened this issue Feb 18, 2022 · 0 comments
Open

UnrolledList: item inserted at wrong location after a remove #189

dhananjays opened this issue Feb 18, 2022 · 0 comments

Comments

@dhananjays
Copy link

version(emsi_containers_unittest) unittest
{
    UnrolledList!int list;
    list.insert(4);
    list.insert(8);
    list.insert(12);
    list.remove(8);
    list.insert(16);

    assert(list.back == 12);   // This assert succeeds, when it should have failed
    assert(list.back == 16);   // This assert fails, when it should have succeeded
}

The bug is in Node.nextAvailableIndex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant