Skip to content

Commit

Permalink
Merge 05a3ea2 into f48af99
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub committed Nov 24, 2019
2 parents f48af99 + 05a3ea2 commit d7f146e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ Base.promote_rule(::Type{Measurement{T}}, ::Type{S}) where {T<:AbstractFloat, S<
Base.promote_rule(::Type{Measurement{T}},
::Type{Measurement{S}}) where {T<:AbstractFloat, S<:AbstractFloat} =
Measurement{promote_type(T, S)}

# adaptation of JuliaLang/julia#30952
@static if VERSION < v"1.3"
Base._range(a::T, step::T, ::Nothing, len::Integer) where {T<:Measurement} =
Base._rangestyle(Base.OrderStyle(T), Base.ArithmeticStyle(T), a, step, len)
end
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -783,3 +783,7 @@ end
@testset "Plot recipes" begin
include("plots.jl")
end

@testset "JuliaLang/julia#30944" begin
@test range(0±0, step=1±.1, length=10) isa StepRangeLen
end

0 comments on commit d7f146e

Please sign in to comment.