JuliaFolds / BangBang.jl

Immutables as mutables, mutables as immutables.
MIT License
108 stars 11 forks source link

broadcast!! on StaticArrays seems wrong #231

Open shashi opened 2 years ago

shashi commented 2 years ago

Hi, I was looking for fill!! but settled for broadcast!!(identity, a, 0)

but:

julia> a = @SMatrix([1 0; 0 1])
2×2 SMatrix{2, 2, Int64, 4} with indices SOneTo(2)×SOneTo(2):
 1  0
 0  1

julia> broadcast!!(identity, a, 0)
0

...I expected it to return a SMatrix. Works fine if a is mutable.