Skip to content

Commit bf886b5

Browse files
authored
fix an instance of getting mapany from Base (#37419)
1 parent be99339 commit bf886b5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

base/broadcast.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ function undot(x::Expr)
11731173
if x.head === :.=
11741174
Expr(:(=), x.args...)
11751175
elseif x.head === :block # occurs in for x=..., y=...
1176-
Expr(:block, mapany(undot, x.args)...)
1176+
Expr(:block, Base.mapany(undot, x.args)...)
11771177
else
11781178
x
11791179
end

test/broadcast.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,3 +938,9 @@ ret = @macroexpand @.([Int, Number] <: Real)
938938

939939
ret = @macroexpand @.([Int, Number] >: Real)
940940
@test ret == :([Int, Number] .>: Real)
941+
942+
# Threw mapany not defined
943+
p = rand(4,4); r = rand(2,4);
944+
p0 = copy(p)
945+
@views @. p[1:2, :] += r
946+
@test p[1:2, :] p0[1:2, :] + r

0 commit comments

Comments
 (0)