Skip to content

Commit 9a13806

Browse files
committed
Make broadcast signature compatible with Base.
A recent PR made some other signatures not define the zero-input version of certain functions where they are not defined in Base. In this case, this seems somewhat unnecessary since there is already a `broadcast(f, ::Number...)` method in `Base`. The alternative is to define `broadcast(f, ::Number)` method here to remove the ambiguity.
1 parent b1714d9 commit 9a13806

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/broadcast.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
# TODO: bad codegen for `broadcast(-, SVector(1,2,3))`
66

7-
@propagate_inbounds function broadcast(f, a::Union{Number, StaticArray}, b::Union{Number, StaticArray}...)
8-
_broadcast(f, broadcast_sizes(a, b...), a, b...)
7+
@propagate_inbounds function broadcast(f, a::Union{Number, StaticArray}...)
8+
_broadcast(f, broadcast_sizes(a...), a...)
99
end
1010

1111
@inline broadcast_sizes(a...) = _broadcast_sizes((), a...)

0 commit comments

Comments
 (0)