Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/forwarddiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,14 @@ function anyeltypedual(x::NamedTuple, ::Type{Val{counter}} = Val{0}) where {coun
anyeltypedual(values(x))
end

function DiffEqBase.anyeltypedual(
function anyeltypedual(
f::SciMLBase.AbstractSciMLFunction, ::Type{Val{counter}}) where {counter}
Any
end

anyeltypedual(::@Kwargs{}, ::Type{Val{counter}} = Val{0}) where {counter} = Any
anyeltypedual(::Type{@Kwargs{}}, ::Type{Val{counter}} = Val{0}) where {counter} = Any

@inline promote_u0(::Nothing, p, t0) = nothing

@inline function promote_u0(u0, p, t0)
Expand Down
2 changes: 1 addition & 1 deletion test/forwarddiff_dual_detection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ for p in p_possibilities_missed
end

p_possibilities_notdual = [
(), (;), [2.0], [2.0, 2], [2.0, (2.0)], [2.0, MyStruct(2.0, 2.0f0)]
(), (;), [2.0], [2.0, 2], [2.0, (2.0)], [2.0, MyStruct(2.0, 2.0f0)], pairs((;))
]

for p in p_possibilities_notdual
Expand Down
Loading