@@ -170,10 +170,10 @@ rt = Base.return_types(broadcast!, Tuple{Function, Array{Float64, 3}, Array{Floa
170
170
@test length (rt) == 1 && rt[1 ] == Array{Float64, 3 }
171
171
172
172
# f.(args...) syntax (#15032)
173
- let x = [1 ,3.2 ,4.7 ], y = [3.5 , pi , 1e-4 ], α = 0.2342 , n = 3
173
+ let x = [1 ,3.2 ,4.7 ], y = [3.5 , pi , 1e-4 ], α = 0.2342
174
174
@test sin .(x) == broadcast (sin, x)
175
175
@test sin .(α) == broadcast (sin, α)
176
- @test factorial .(n ) == broadcast (factorial, n )
176
+ @test factorial .(3 ) == broadcast (factorial, 3 )
177
177
@test atan2 .(x, y) == broadcast (atan2, x, y)
178
178
@test atan2 .(x, y' ) == broadcast (atan2, x, y' )
179
179
@test atan2 .(x, α) == broadcast (atan2, x, α)
220
220
let x = sin .(1 : 10 )
221
221
@test atan2 .((x-> x+ 1 ). (x), (x-> x+ 2 ). (x)) == atan2 (x+ 1 , x+ 2 ) == atan2 (x.+ 1 , x.+ 2 )
222
222
@test sin .(atan2 .([x+ 1 ,x+ 2 ]. .. )) == sin .(atan2 .(x+ 1 ,x+ 2 ))
223
+ @test sin .(atan2 .(x, 3.7 )) == broadcast (x -> sin (atan2 (x,3.7 )), x)
223
224
@test atan2 .(x, 3.7 ) == broadcast (x -> atan2 (x,3.7 ), x) == broadcast (atan2, x, 3.7 )
224
225
end
225
226
# Use side effects to check for loop fusion. Note that, due to #17314,
@@ -236,6 +237,7 @@ let x = sin.(1:10), a = [x]
236
237
@test atan2 .(x, cos .(x)) == atan2 .(a... , cos .(x)) == atan2 (x, cos .(a... )) == atan2 (a... , cos .(a... ))
237
238
@test ((args... )-> cos (args[1 ])). (x) == cos .(x) == ((y,args... )-> cos (y)). (x)
238
239
end
240
+ @test atan2 .(3 ,4 ) == atan2 (3 ,4 ) == (() -> atan2 (3 ,4 )). ()
239
241
240
242
# PR 16988
241
243
@test Base. promote_op (+ , Bool) === Int
0 commit comments