We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
zero(::AbstractArray)
fill!
I thought this was just an issue in StaticArrays (JuliaArrays/StaticArrays.jl#428), but the same thing is happening in Base.
Currently:
julia> mutable struct MyNumber val::Float64 end julia> Base.zero(::Type{MyNumber}) = MyNumber(0.0) julia> v = zero([MyNumber(1.0), MyNumber(2.0)]) 2-element Array{MyNumber,1}: MyNumber(0.0) MyNumber(0.0) julia> v[1].val = 1 1 julia> v 2-element Array{MyNumber,1}: MyNumber(1.0) MyNumber(1.0)
I think this is not desirable for non-isbits types.
The text was updated successfully, but these errors were encountered:
zeros
Duplicate of #29168
Sorry, something went wrong.
No branches or pull requests
I thought this was just an issue in StaticArrays (JuliaArrays/StaticArrays.jl#428), but the same thing is happening in Base.
Currently:
I think this is not desirable for non-isbits types.
The text was updated successfully, but these errors were encountered: