Skip to content

Commit bab7d21

Browse files
Merge pull request #287 from SciML/simplify-issymbollike
simplify issymbollike
2 parents 0965fc1 + 7eb5df9 commit bab7d21

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "2.38.10"
4+
version = "2.39.0"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/vector_of_array.jl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,9 @@ end
6464
struct AllObserved
6565
end
6666

67-
Base.@pure __parameterless_type(T) = Base.typename(T).wrapper
68-
69-
@generated function issymbollike(x)
70-
x <: Union{Symbol, AllObserved} && return quote true end
71-
ss = ["Operation", "Variable", "Sym", "Num", "Term"]
72-
s = string(Symbol(__parameterless_type(x)))
73-
bool = any(x -> occursin(x, s), ss)
74-
quote
75-
$bool
76-
end
77-
end
67+
# extended by Symbolcs
68+
issymbollike(::Any) = false
69+
issymbollike(::Union{Symbol, AllObserved}) = true
7870

7971
function Base.Array(VA::AbstractVectorOfArray{T, N, A}) where {T, N,
8072
A <: AbstractVector{
@@ -196,6 +188,7 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractDiffEqArray{T, N},
196188
RecursiveArrayTools.VectorOfArray(A.u)[I...]
197189
end
198190

191+
__parameterless_type(T) = Base.typename(T).wrapper
199192
Base.@propagate_inbounds function Base.getindex(A::AbstractVectorOfArray{T, N},
200193
I::Colon...) where {T, N}
201194
@assert length(I) == ndims(A.u[1]) + 1

0 commit comments

Comments
 (0)