Skip to content

Commit 6c62fb1

Browse files
fix: fix prohibitively narrow type annotations in SCCNonlinearProblem
1 parent afe5a76 commit 6c62fb1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/problems/sccnonlinearproblem.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const TypeT = Union{DataType, UnionAll}
2-
31
struct CacheWriter{F}
42
fn::F
53
end
@@ -161,8 +159,8 @@ function SciMLBase.SCCNonlinearProblem{iip}(sys::System, op; eval_expression = f
161159
end
162160

163161
# map from symtype to cached variables and their expressions
164-
cachevars = Dict{Union{DataType, UnionAll}, Vector{Any}}()
165-
cacheexprs = Dict{Union{DataType, UnionAll}, Vector{Any}}()
162+
cachevars = Dict{TypeT, Vector{Any}}()
163+
cacheexprs = Dict{TypeT, Vector{Any}}()
166164
# observed of previous SCCs are in the cache
167165
# NOTE: When we get proper CSE, we can substitute these
168166
# and then use `subexpressions_not_involving_vars!`

src/systems/index_cache.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
const TypeT = Union{DataType, UnionAll, Union}
2+
13
struct BufferTemplate
2-
type::Union{DataType, UnionAll, Union}
4+
type::TypeT
35
length::Int
46
end
57

0 commit comments

Comments
 (0)