-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
broadcastApplying a function over a collectionApplying a function over a collectionbugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
This is fixed by #25377, but if that doesn't make it into 1.0, this is just a reminder to fix the old code.
From #25377 (comment):
julia> X = Any[1,2]
2-element Array{Any,1}:
1
2
julia> X .= missing
2-element Array{Any,1}:
missing
missing
julia> X .= nothing
ERROR: MethodError: no method matching _broadcast!(::typeof(identity), ::Array{Any,1})
Closest candidates are:
_broadcast!(::Any, ::AbstractArray, ::K, ::ID, ::AT, ::BT, ::Val{N}, ::Any) where {K, ID, AT, BT, N} at broadcast.jl:377
_broadcast!(::Any, ::AbstractArray, ::K, ::ID, ::AT, ::Val{nargs}, ::Any, ::Any, ::Any) where {K, ID, AT, nargs} at broadcast.jl:489
_broadcast!(::Any, ::Any, ::Any, ::Any...) where N at broadcast.jl:477
...
Stacktrace:
[1] broadcast!(::Function, ::Array{Any,1}, ::Nothing) at ./broadcast.jl:455
[2] top-level scopeand from #24992 (comment):
I note that now I can't use nothing as the first input for
broadcast/broadcast!as a scalar value. For instance I can dotuple.([1,2,3], nothing)but I can't dotuple.(nothing, [1,2,3]). This strikes me as odd.
andyferris
Metadata
Metadata
Assignees
Labels
broadcastApplying a function over a collectionApplying a function over a collectionbugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior