OrderedTable cannot delete entry with empty string or 0 key #5035

Closed
flyx opened this Issue Nov 18, 2016 · 0 comments

Projects

None yet

1 participant

@flyx
Contributor
flyx commented Nov 18, 2016
import tables

var o = newOrderedTable[string, string]()
o[""] = "foo"
o.del("")
echo o

Output:

{: foo}

Expected:

{:}

Works with non-empty strings. Also fails with:

import tables

var o = newOrderedTable[int, string]()
o[0] = "foo"
o.del(0)
echo o
@Araq Araq pushed a commit that closed this issue Nov 19, 2016
@flyx flyx Fixes #5035 93a9982
@Araq Araq closed this in 93a9982 Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment