@@ -1309,33 +1309,33 @@ macro __dot__(x)
1309
1309
esc (__dot__ (x))
1310
1310
end
1311
1311
1312
- @inline function broadcasted_kwsyntax (f, args... ; kwargs... )
1312
+ @inline function broadcasted_kwsyntax (f:: F , args... ; kwargs... ) where {F}
1313
1313
if isempty (kwargs) # some BroadcastStyles dispatch on `f`, so try to preserve its type
1314
1314
return broadcasted (f, args... )
1315
1315
else
1316
1316
return broadcasted ((args... ) -> f (args... ; kwargs... ), args... )
1317
1317
end
1318
1318
end
1319
- @inline function broadcasted (f, args... )
1319
+ @inline function broadcasted (f:: F , args... ) where {F}
1320
1320
args′ = map (broadcastable, args)
1321
1321
broadcasted (combine_styles (args′... ), f, args′... )
1322
1322
end
1323
1323
# Due to the current Type{T}/DataType specialization heuristics within Tuples,
1324
1324
# the totally generic varargs broadcasted(f, args...) method above loses Type{T}s in
1325
1325
# mapping broadcastable across the args. These additional methods with explicit
1326
1326
# arguments ensure we preserve Type{T}s in the first or second argument position.
1327
- @inline function broadcasted (f, arg1, args... )
1327
+ @inline function broadcasted (f:: F , arg1:: T1 , args... ) where {F, T1}
1328
1328
arg1′ = broadcastable (arg1)
1329
1329
args′ = map (broadcastable, args)
1330
1330
broadcasted (combine_styles (arg1′, args′... ), f, arg1′, args′... )
1331
1331
end
1332
- @inline function broadcasted (f, arg1, arg2, args... )
1332
+ @inline function broadcasted (f:: F , arg1:: T1 , arg2:: T2 , args... ) where {F, T1, T2}
1333
1333
arg1′ = broadcastable (arg1)
1334
1334
arg2′ = broadcastable (arg2)
1335
1335
args′ = map (broadcastable, args)
1336
1336
broadcasted (combine_styles (arg1′, arg2′, args′... ), f, arg1′, arg2′, args′... )
1337
1337
end
1338
- @inline broadcasted (:: S , f, args... ) where S<: BroadcastStyle = Broadcasted {S} (f, args)
1338
+ @inline broadcasted (:: S , f:: F , args... ) where { S<: BroadcastStyle , F} = Broadcasted {S} (f, args)
1339
1339
1340
1340
"""
1341
1341
BroadcastFunction{F} <: Function
0 commit comments