Skip to content

Commit 989b19a

Browse files
Better handle dictionaries in anytypedual
1 parent d70c406 commit 989b19a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/DiffEqBaseForwardDiffExt.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,18 @@ function anyeltypedual(x::NamedTuple, ::Type{Val{counter}} = Val{0}) where {coun
442442
anyeltypedual(values(x))
443443
end
444444

445+
function anyeltypedual(
446+
x::AbstractDict, ::Type{Val{counter}}) where {counter}
447+
anyeltypedual(keys(x))
448+
end
449+
445450
function anyeltypedual(
446451
f::SciMLBase.AbstractSciMLFunction, ::Type{Val{counter}}) where {counter}
447452
Any
448453
end
449454

455+
456+
450457
anyeltypedual(::@Kwargs{}, ::Type{Val{counter}} = Val{0}) where {counter} = Any
451458
anyeltypedual(::Type{@Kwargs{}}, ::Type{Val{counter}} = Val{0}) where {counter} = Any
452459

0 commit comments

Comments
 (0)