-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
copyto! dispatches incorrectly for BitVector #25968
Comments
Thanks! Looks like the |
|
I just ran into this bug in my code, I looked over my logic so many times but I finally figured out it was this issue. I ran jamii's code on my repl: julia> a = BitVector([true, false, true])
3-element BitVector:
1
0
1
julia> unsafe_copyto!(a, 2, a, 1, 2)
3-element BitVector:
1
1
0
julia> a = BitVector([true, false, true])
3-element BitVector:
1
0
1
julia> copyto!(a, 2, a, 1, 2)
3-element BitVector:
1
1
1
julia> @which unsafe_copyto!(a, 2, a, 1, 2)
unsafe_copyto!(dest::BitArray, doffs::Integer, src::Union{BitArray, Array}, soffs::Integer, n::Integer) in Base at bitarray.jl:456
julia> @which copyto!(a, 2, a, 1, 2)
copyto!(dest::AbstractArray, dstart::Integer, src::AbstractArray, sstart::Integer, n::Integer) in Base at abstractarray.jl:1057
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_DIR = C:\Users\JohnB\AppData\Local\Programs\Julia-1.7.0``` |
…uliaLang#46161) 1. map `copyto!(::BitArray, n1, ::BitArray, n2, l)` to `Base.unsafe_copyto!` 2. add missing unaliasing in `copyto!` for `AbstractArray`
…uliaLang#46161) 1. map `copyto!(::BitArray, n1, ::BitArray, n2, l)` to `Base.unsafe_copyto!` 2. add missing unaliasing in `copyto!` for `AbstractArray`
This is also broken on v0.6.2.
The text was updated successfully, but these errors were encountered: