Open
Description
The following code errors on v1.11-rc1 but works on 1.10 v1.11-beta2
a = Base.Experimental.Const([1,2,3])
b = rand(3)
b .= a # works as expected
av = view(a, 1:2)
bv = view(b, 1:2)
bv .= av # errors on v1.11-rc1
ERROR: MethodError: no method matching elsize(::Type{Base.Experimental.Const{Int64, 1}})
The function `elsize` exists, but no method is defined for this combination of argument types.
Closest candidates are:
elsize(::Type{Union{}}, Any...)
@ Base array.jl:233
elsize(::Type{<:SubArray{<:Any, <:Any, P}}) where P
@ Base subarray.jl:442
elsize(::Type{A}) where {T, A<:(Array{T})}
@ Base array.jl:225
...
Stacktrace:
[1] elsize(A::Base.Experimental.Const{Int64, 1})
@ Base ./abstractarray.jl:257
[2] _parentsmatch(A::Vector{Float64}, B::Base.Experimental.Const{Int64, 1})
@ Base ./multidimensional.jl:1071
[3] mightalias(A::SubArray{…}, B::SubArray{…})
@ Base ./multidimensional.jl:1056
[4] unalias(dest::SubArray{…}, A::SubArray{…})
@ Base ./abstractarray.jl:1503
[5] copyto!
@ ./abstractarray.jl:1060 [inlined]
[6] copyto!
@ ./broadcast.jl:961 [inlined]
[7] copyto!
@ ./broadcast.jl:920 [inlined]
[8] materialize!
@ ./broadcast.jl:878 [inlined]
[9] materialize!(dest::SubArray{…}, bc::Base.Broadcast.Broadcasted{…})
@ Base.Broadcast ./broadcast.jl:875
[10] top-level scope
@ REPL[12]:1
[11] top-level scope
@ none:1
Some type information was truncated. Use `show(err)` to see complete types.