File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,12 @@ function (dec::DualEltypeChecker)(::Val{Y}) where {Y}
6363 anyeltypedual (getproperty (dec. x, Y), dec. counter)
6464end
6565
66- # use `getfield` for `Pairs`, see https://github.com/JuliaLang/julia/pull/39448
67- function (dec:: DualEltypeChecker{<:Base.Pairs} )(:: Val{Y} ) where {Y}
68- isdefined (dec. x, Y) || return Any
69- anyeltypedual (getfield (dec. x, Y), dec. counter)
66+ # use `getfield` on `Pairs`, see https://github.com/JuliaLang/julia/pull/39448
67+ if VERSION >= v " 1.7"
68+ function (dec:: DualEltypeChecker{<:Base.Pairs} )(:: Val{Y} ) where {Y}
69+ isdefined (dec. x, Y) || return Any
70+ anyeltypedual (getfield (dec. x, Y), dec. counter)
71+ end
7072end
7173
7274# Untyped dispatch: catch composite types, check all of their fields
Original file line number Diff line number Diff line change @@ -222,3 +222,7 @@ for p in p_possibilities_configs_not_inferred
222222 u0 = ForwardDiff. Dual (2.0 )
223223 @test DiffEqBase. promote_u0 (u0, p, t0) isa ForwardDiff. Dual
224224end
225+
226+ # use `getfield` on `Pairs`, see https://github.com/JuliaLang/julia/pull/39448
227+ VERSION >= v " 1.7" &&
228+ @test_nowarn DiffEqBase. DualEltypeChecker (pairs ((;)), 0 )(Val (:data ))
You can’t perform that action at this time.
0 commit comments