Skip to content

Commit 03278a6

Browse files
authored
Work around #20220, deprecation warning for Array repeating endlessly (#20538)
1 parent ddb1e1e commit 03278a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

base/deprecated.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ macro deprecate(old,new,ex=true)
4242
else
4343
error("invalid usage of @deprecate")
4444
end
45-
oldname = Expr(:quote, oldsym)
45+
# work around #20220, deprecation for Array repeating over and over
46+
# TODO: remove the special case when 0.6 deprecations are removed
47+
oldname = Expr(:quote, oldsym in (:Array, :SharedArray) ? :Type : oldsym)
4648
Expr(:toplevel,
4749
Expr(:export,esc(oldsym)),
4850
:($(esc(old)) = begin
@@ -1140,6 +1142,7 @@ function partial_linear_indexing_warning(n)
11401142
end
11411143

11421144
# Deprecate Array(T, dims...) in favor of proper type constructors
1145+
# TODO: when removing these, get rid of the special casing in the @deprecate macro up top
11431146
@deprecate Array{T,N}(::Type{T}, d::NTuple{N,Int}) Array{T}(d)
11441147
@deprecate Array{T}(::Type{T}, d::Int...) Array{T}(d...)
11451148
@deprecate Array{T}(::Type{T}, m::Int) Array{T}(m)

0 commit comments

Comments
 (0)