File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,6 @@ AbstractArray{T}(a::OneToInf) where T<:Real = InfUnitRange{T}(a)
143143AbstractVector {T} (a:: OneToInf ) where T<: Real = InfUnitRange {T} (a)
144144
145145
146- (== )(:: OneToInf , :: OneToInf ) = true
147-
148146# # interface implementations
149147
150148size (r:: InfRanges ) = (ℵ₀,)
Original file line number Diff line number Diff line change 298298 @test 0.0 : 0.1 : ∞ != 0.0f0 : 0.1f0 : ∞
299299 end
300300
301+ @testset " constprop in comparing OneToInf" begin
302+ r1 = OneToInf {Int8} ()
303+ r2 = OneToInf {Int16} ()
304+ v = @inferred ((r1,r2) -> Val (r1 == r2))(r1, r2)
305+ @test v isa Val{true }
306+ end
307+
301308 @testset " comparing InfiniteUnitRanges and OneToInf" begin
302309 @test 1 : 2 : ∞ == 1 : 2 : ∞ != 1 : 3 : ∞ != 2 : 3 : ∞ == 2 : 3 : ∞ != 2 : ∞
303310 @test 1 : 1 : ∞ == 1 : ∞ == 1 : ∞ == OneToInf () == OneToInf ()
You can’t perform that action at this time.
0 commit comments