Broadcast dot in a normal setfield! - intended behavior or bug?


#1

This errors in the latest Julia master but worked in Julia 0.6.4.

a = [1, 2]
a[2] .= a[1]

Is this issue-worthy or the intended behavior?


#2

On version 0.7:

julia> a = [1,2]
2-element Array{Int64,1}:
 1
 2

julia> a[2] .= a[1]
┌ Warning: the behavior of `A[I...] .= X` with scalar indices will change in the
 future. Use `A[I...] = X` instead.
│   caller = ip:0x0
└ @ Core :-1
0-dimensional view(::Array{Int64,1}, 2) with eltype Int64:
1

julia> a
2-element Array{Int64,1}:
 1
 1

#3

Thanks!