diff --git a/base/broadcast.jl b/base/broadcast.jl index e68b5ec223729..12bddaf531e27 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -1173,7 +1173,7 @@ function undot(x::Expr) if x.head === :.= Expr(:(=), x.args...) elseif x.head === :block # occurs in for x=..., y=... - Expr(:block, mapany(undot, x.args)...) + Expr(:block, Base.mapany(undot, x.args)...) else x end diff --git a/test/broadcast.jl b/test/broadcast.jl index 820a673cca7cb..5f4b7f853c5dd 100644 --- a/test/broadcast.jl +++ b/test/broadcast.jl @@ -938,3 +938,9 @@ ret = @macroexpand @.([Int, Number] <: Real) ret = @macroexpand @.([Int, Number] >: Real) @test ret == :([Int, Number] .>: Real) + +# Threw mapany not defined +p = rand(4,4); r = rand(2,4); +p0 = copy(p) +@views @. p[1:2, :] += r +@test p[1:2, :] ≈ p0[1:2, :] + r