Skip to content

Commit 5148556

Browse files
committed
update eltype(::Type{I}) where {I<:AbstractInterval{T}}
1 parent 031a18d commit 5148556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IntervalSets.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ isclosedset(d::AbstractInterval) = isleftclosed(d) && isrightclosed(d)
6363
isopenset(d::AbstractInterval) = isleftopen(d) && isrightopen(d)
6464

6565
eltype(::Type{AbstractInterval{T}}) where {T} = T
66-
@pure eltype(::Type{I}) where {I<:AbstractInterval} = eltype(supertype(I))
66+
eltype(::Type{I}) where {I<:AbstractInterval{T}} where T = T
6767

6868
convert(::Type{AbstractInterval}, i::AbstractInterval) = i
6969
convert(::Type{AbstractInterval{T}}, i::AbstractInterval{T}) where T = i

0 commit comments

Comments
 (0)