JuliaCollections / JuliaCollections/DataStructures.jl
Bug: delete!(::MutableLinkedList, ::UnitRange)
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
This was verified on 0.18.8 and master
If a UnitRange with first == last is used then a boundary error is thrown. See https://github.com/JuliaCollections/DataStructures.jl/blob/master/src/mutable_list.jl#L182
I can't think of a reason for forbidding such situations thus I would suggest lowering the constraints to:
@boundscheck 0 < first(r) <= last(r) <= l.len || throw(BoundsError(l, r))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read src/mutable_list.jl around line 182 and inspect the bounds check used by delete! for a UnitRange. Verify the behavior for a range whose first and last values are equal, then run the relevant test suite to confirm valid singleton ranges no longer raise a boundary error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100