@@ -258,7 +258,7 @@ longest(::Tuple{}, ::Tuple{}) = ()
258
258
# combine_styles operates on values (arbitrarily many)
259
259
combine_styles (c) = result_style (BroadcastStyle (typeof (c)))
260
260
combine_styles (c1, c2) = result_style (combine_styles (c1), combine_styles (c2))
261
- combine_styles (c1, c2, cs... ) = result_style (combine_styles (c1), combine_styles (c2, cs... ))
261
+ @inline combine_styles (c1, c2, cs... ) = result_style (combine_styles (c1), combine_styles (c2, cs... ))
262
262
263
263
# result_style works on types (singletons and pairs), and leverages `BroadcastStyle`
264
264
result_style (s:: BroadcastStyle ) = s
@@ -442,8 +442,8 @@ Note that `dest` is only used to store the result, and does not supply
442
442
arguments to `f` unless it is also listed in the `As`,
443
443
as in `broadcast!(f, A, A, B)` to perform `A[:] = broadcast(f, A, B)`.
444
444
"""
445
- @inline broadcast! (f, dest, As... ) = broadcast! (f, dest, combine_styles (As... ), As... )
446
- @inline broadcast! (f, dest, :: BroadcastStyle , As... ) = broadcast! (f, dest, nothing , As... )
445
+ @inline broadcast! (f:: Tf , dest, As:: Vararg{Any,N} ) where {Tf,N} = broadcast! (f, dest, combine_styles (As... ), As... )
446
+ @inline broadcast! (f:: Tf , dest, :: BroadcastStyle , As:: Vararg{Any,N} ) where {Tf,N} = broadcast! (f, dest, nothing , As... )
447
447
448
448
# Default behavior (separated out so that it can be called by users who want to extend broadcast!).
449
449
@inline function broadcast! (f, dest, :: Void , As:: Vararg{Any, N} ) where N
0 commit comments