diff --git a/base/array.jl b/base/array.jl index a9c8e46b0de28..7cf0424513fce 100644 --- a/base/array.jl +++ b/base/array.jl @@ -85,7 +85,6 @@ UInt8 ``` """ eltype(::Type) = Any -eltype(::Type{Any}) = Any eltype(::Type{Bottom}) = throw(ArgumentError("Union{} does not have elements")) eltype(x) = eltype(typeof(x)) diff --git a/base/pointer.jl b/base/pointer.jl index b0ded31b87a27..bbc5c215d38f2 100644 --- a/base/pointer.jl +++ b/base/pointer.jl @@ -143,8 +143,6 @@ function pointer_from_objref(@nospecialize(x)) ccall(:jl_value_ptr, Ptr{Cvoid}, (Any,), x) end -eltype(::Type{Ptr{T}}) where {T} = T - ## limited pointer arithmetic & comparison ## ==(x::Ptr, y::Ptr) = UInt(x) == UInt(y) diff --git a/stdlib/Dates/src/types.jl b/stdlib/Dates/src/types.jl index d6ea6a875926f..a21ef5de353ef 100644 --- a/stdlib/Dates/src/types.jl +++ b/stdlib/Dates/src/types.jl @@ -339,7 +339,6 @@ Base.typemin(::Union{Date, Type{Date}}) = Date(-252522163911150, 1, 1) Base.typemax(::Union{Time, Type{Time}}) = Time(23, 59, 59, 999, 999, 999) Base.typemin(::Union{Time, Type{Time}}) = Time(0) # Date-DateTime promotion, isless, == -Base.eltype(::Type{T}) where {T<:Period} = T Base.promote_rule(::Type{Date}, x::Type{DateTime}) = DateTime Base.isless(x::T, y::T) where {T<:TimeType} = isless(value(x), value(y)) Base.isless(x::TimeType, y::TimeType) = isless(promote(x, y)...)