diff --git a/src/problems/sccnonlinearproblem.jl b/src/problems/sccnonlinearproblem.jl index 171265eefc..20afd4d7a8 100644 --- a/src/problems/sccnonlinearproblem.jl +++ b/src/problems/sccnonlinearproblem.jl @@ -1,5 +1,3 @@ -const TypeT = Union{DataType, UnionAll} - struct CacheWriter{F} fn::F end @@ -161,8 +159,8 @@ function SciMLBase.SCCNonlinearProblem{iip}(sys::System, op; eval_expression = f end # map from symtype to cached variables and their expressions - cachevars = Dict{Union{DataType, UnionAll}, Vector{Any}}() - cacheexprs = Dict{Union{DataType, UnionAll}, Vector{Any}}() + cachevars = Dict{TypeT, Vector{Any}}() + cacheexprs = Dict{TypeT, Vector{Any}}() # observed of previous SCCs are in the cache # NOTE: When we get proper CSE, we can substitute these # and then use `subexpressions_not_involving_vars!` diff --git a/src/systems/index_cache.jl b/src/systems/index_cache.jl index 2594bb06c0..0482e07c5f 100644 --- a/src/systems/index_cache.jl +++ b/src/systems/index_cache.jl @@ -1,5 +1,7 @@ +const TypeT = Union{DataType, UnionAll, Union} + struct BufferTemplate - type::Union{DataType, UnionAll, Union} + type::TypeT length::Int end