Skip to content

Commit 2536221

Browse files
committed
chore: remove 1.8 checks
1 parent 9adf362 commit 2536221

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

src/dual.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,9 @@ Base.copy(d::Dual) = d
298298
Base.eps(d::Dual) = eps(value(d))
299299
Base.eps(::Type{D}) where {D<:Dual} = eps(valtype(D))
300300

301-
# The `base` keyword was added in Julia 1.8:
302-
# https://github.com/JuliaLang/julia/pull/42428
303-
if VERSION < v"1.8.0-DEV.725"
304-
Base.precision(d::Dual) = precision(value(d))
305-
Base.precision(::Type{D}) where {D<:Dual} = precision(valtype(D))
306-
else
307-
Base.precision(d::Dual; base::Integer=2) = precision(value(d); base=base)
308-
function Base.precision(::Type{D}; base::Integer=2) where {D<:Dual}
309-
precision(valtype(D); base=base)
310-
end
301+
Base.precision(d::Dual; base::Integer=2) = precision(value(d); base=base)
302+
function Base.precision(::Type{D}; base::Integer=2) where {D<:Dual}
303+
precision(valtype(D); base=base)
311304
end
312305

313306
function Base.nextfloat(d::ForwardDiff.Dual{T,V,N}) where {T,V,N}

test/DualTest.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,10 @@ ForwardDiff.:≺(::Type{OuterTestTag}, ::Type{TestTag}) = false
118118
@test precision(typeof(FDNUM)) === precision(V)
119119
@test precision(NESTED_FDNUM) === precision(PRIMAL)
120120
@test precision(typeof(NESTED_FDNUM)) === precision(V)
121-
if VERSION >= v"1.8.0-DEV.725" # https://github.com/JuliaLang/julia/pull/42428
122-
@test precision(FDNUM; base=10) === precision(PRIMAL; base=10)
123-
@test precision(typeof(FDNUM); base=10) === precision(V; base=10)
124-
@test precision(NESTED_FDNUM; base=10) === precision(PRIMAL; base=10)
125-
@test precision(typeof(NESTED_FDNUM); base=10) === precision(V; base=10)
126-
end
121+
@test precision(FDNUM; base=10) === precision(PRIMAL; base=10)
122+
@test precision(typeof(FDNUM); base=10) === precision(V; base=10)
123+
@test precision(NESTED_FDNUM; base=10) === precision(PRIMAL; base=10)
124+
@test precision(typeof(NESTED_FDNUM); base=10) === precision(V; base=10)
127125

128126
@test floor(Int, FDNUM) === floor(Int, PRIMAL)
129127
@test floor(Int, FDNUM2) === floor(Int, PRIMAL2)

0 commit comments

Comments
 (0)