-
-
Notifications
You must be signed in to change notification settings - Fork 120
fix deprecated call #819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix deprecated call #819
Conversation
Since Julia's #39448, `getproperty` has been deprecated in favor of `getfield`.
|
That PR is only about |
|
I get ┌ Warning: use values(kwargs) and keys(kwargs) instead of kwargs.data and kwargs.itr
│ caller = DualEltypeChecker at forwarddiff.jl:62 [inlined]
└ @ Core ~/.julia/packages/DiffEqBase/iK5G7/src/forwarddiff.jl:62Maybe struct DualEltypeChecker{T}
x::T
counter::Int
DualEltypeChecker(x::T, counter::Int) where {T} = new{T}(x, counter + 1)
end
function (dec::DualEltypeChecker)(::Val{Y}) where {Y}
isdefined(dec.x, Y) || return Any
anyeltypedual(getproperty(dec.x, Y), dec.counter)
endis of type The proposed change seems to fix this. |
|
The solution would then be to create a separate dispatch on |
|
Thanks, updated the PR. |
|
Can you add a test with |
|
Test failure looks real |
|
Thanks, sure, the issue is that |
|
Beautiful. Don't worry about the formatter, I'll merge and run it. Thanks! |
Great, many thanks! |
Since JuliaLang/julia#39448,
getpropertyhas been deprecated in favor ofgetfield.