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

deleteat!(::BitVector, inds) : check bounds for the first passed index #36359

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

rfourquet
Copy link
Member

@rfourquet rfourquet commented Jun 19, 2020

Similar to #36231, a discourse post about this method just prompted me to check whether this also needed fixing, it does:

julia> deleteat!(trues(1), [2])
0-element BitArray{1}

julia> deleteat!(trues(1), [-1, 0, 1])
0-element BitArray{1}:

julia> deleteat!(trues(1), [-1, 1]) # this one correctly throws for some reason
ERROR: BoundsError: attempt to access 1-element Array{UInt64,1} at index [0]
[...]

@rfourquet rfourquet added arrays [a, r, r, a, y, s] bugfix This change fixes an existing bug backport 1.5 labels Jun 19, 2020
@rfourquet rfourquet added this to the 1.5 milestone Jun 25, 2020
@KristofferC KristofferC mentioned this pull request Jun 25, 2020
9 tasks
@mbauman mbauman merged commit 29e1454 into master Jun 25, 2020
@mbauman mbauman deleted the rf/fix-bitvector-deleteat branch June 25, 2020 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants