Skip to content

Commit 72ab3fb

Browse files
committed
widen IteratorSize unknown definition
1 parent e25d605 commit 72ab3fb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/IntervalSets.jl

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export AbstractInterval, Interval, OpenInterval, ClosedInterval,
2222
A subtype of `Domain{T}` represents a subset of type `T`, that provides `in`.
2323
"""
2424
abstract type Domain{T} end
25+
26+
Base.IteratorSize(::Type{<:Domain}) = Base.SizeUnknown()
27+
28+
2529
"""
2630
A subtype of `AbstractInterval{T}` represents an interval subset of type `T`, that provides
2731
`endpoints`, `closedendpoints`.

src/interval.jl

-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ ClosedInterval(i::AbstractUnitRange{I}) where {I<:Integer} = ClosedInterval{I}(m
229229

230230
Base.promote_rule(::Type{Interval{L,R,T1}}, ::Type{Interval{L,R,T2}}) where {L,R,T1,T2} = Interval{L,R,promote_type(T1, T2)}
231231

232-
Base.IteratorSize(::Type{<:ClosedInterval}) = Base.SizeUnknown()
233-
234232
# convert should only work if they represent the same thing.
235233
@deprecate convert(::Type{R}, i::ClosedInterval{I}) where {R<:AbstractUnitRange,I<:Integer} R(i)
236234
@deprecate length(i::ClosedInterval) IntervalSets.duration(i)

0 commit comments

Comments
 (0)