Skip to content

Commit bdaa13f

Browse files
committed
fix type-predicate queries
1 parent 1381f0c commit bdaa13f

35 files changed

+616
-762
lines changed

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ function hash(a::AbstractArray{T}, h::UInt) where T
19801980
# to a range with more than two elements because more extreme values
19811981
# cannot be represented. We must still hash the two first values as a
19821982
# range since they can always be considered as such (in a wider type)
1983-
if isconcrete(T)
1983+
if isconcretetype(T)
19841984
try
19851985
step = x2 - x1
19861986
catch err

base/complex.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ big(z::Complex{T}) where {T<:Real} = Complex{big(T)}(z)
976976
complex(A::AbstractArray{<:Complex}) = A
977977

978978
function complex(A::AbstractArray{T}) where T
979-
if !isconcrete(T)
979+
if !isconcretetype(T)
980980
error("`complex` not defined on abstractly-typed arrays; please convert to a more specific type")
981981
end
982982
convert(AbstractArray{typeof(complex(zero(T)))}, A)

base/deprecated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ import .Iterators.enumerate
783783
@deprecate map(f, d::T) where {T<:AbstractDict} T( f(p) for p in pairs(d) )
784784

785785
# issue #17086
786-
@deprecate isleaftype isconcrete
786+
@deprecate isleaftype isconcretetype
787787

788788
# PR #22932
789789
@deprecate +(a::Number, b::AbstractArray) broadcast(+, a, b)

base/dict.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function show(io::IO, t::AbstractDict{K,V}) where V where K
3434
if isempty(t)
3535
print(io, typeof(t), "()")
3636
else
37-
if _isleaftype(K) && _isleaftype(V)
37+
if isconcretetype(K) && isconcretetype(V)
3838
print(io, typeof(t).name)
3939
else
4040
print(io, typeof(t))
@@ -160,7 +160,7 @@ dict_with_eltype(DT_apply, ::Type) = DT_apply(Any, Any)()
160160
dict_with_eltype(DT_apply::F, kv, t) where {F} = grow_to!(dict_with_eltype(DT_apply, @default_eltype(typeof(kv))), kv)
161161
function dict_with_eltype(DT_apply::F, kv::Generator, t) where F
162162
T = @default_eltype(kv)
163-
if T <: Union{Pair, Tuple{Any, Any}} && _isleaftype(T)
163+
if T <: Union{Pair, Tuple{Any, Any}} && isconcretetype(T)
164164
return dict_with_eltype(DT_apply, kv, T)
165165
end
166166
return grow_to!(dict_with_eltype(DT_apply, T), kv)

base/exports.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,8 @@ export
865865
fieldname,
866866
fieldnames,
867867
fieldcount,
868-
isconcrete,
868+
isconcretetype,
869+
isdispatchtuple,
869870
oftype,
870871
promote,
871872
promote_rule,

base/float.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ Base.iszero(x::Float16) = reinterpret(UInt16, x) & ~sign_mask(Float16) == 0x0000
863863
float(A::AbstractArray{<:AbstractFloat}) = A
864864

865865
function float(A::AbstractArray{T}) where T
866-
if !isconcrete(T)
866+
if !isconcretetype(T)
867867
error("`float` not defined on abstractly-typed arrays; please convert to a more specific type")
868868
end
869869
convert(AbstractArray{typeof(float(zero(T)))}, A)

0 commit comments

Comments
 (0)