Skip to content

Commit 7c21992

Browse files
fix: add getproperty method for backwards compatibility
1 parent 3b79cc8 commit 7c21992

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/scimlfunctions.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4597,3 +4597,14 @@ function SymbolicIndexingInterface.observed(fn::AbstractSciMLFunction, sym::Symb
45974597
end
45984598

45994599
SymbolicIndexingInterface.constant_structure(::AbstractSciMLFunction) = true
4600+
4601+
function Base.getproperty(x::Union{ODEFunction, SplitFunction, DAEFunction}, sym::Symbol)
4602+
if sym == :initializeprob || sym == :update_initializeprob! || sym == :initializeprobmap || sym == :initializeprobpmap
4603+
if x.initialization_data === nothing
4604+
return nothing
4605+
else
4606+
return getproperty(x.initialization_data, sym)
4607+
end
4608+
end
4609+
return getfield(x, sym)
4610+
end

0 commit comments

Comments
 (0)