Skip to content

Commit f0bd7e4

Browse files
committed
Fix maketerm when symtype is array
1 parent 77951c9 commit f0bd7e4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/types.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,17 +563,18 @@ function TermInterface.maketerm(T::Type{<:BasicSymbolic}, head, args, metadata)
563563
# Where the result would have a symtype of Bool.
564564
# Please see discussion in https://github.com/JuliaSymbolics/SymbolicUtils.jl/pull/609
565565
# TODO this should be optimized.
566-
new_st = if pst === Bool
567-
pst
568-
elseif pst === Any || (st === Number && pst <: st)
566+
new_st = if st <: AbstractArray
569567
st
570-
else
571-
pst
572-
end
568+
elseif pst === Bool
569+
pst
570+
elseif pst === Any || (st === Number && pst <: st)
571+
st
572+
else
573+
pst
574+
end
573575
basicsymbolic(head, args, new_st, metadata)
574576
end
575577

576-
577578
function basicsymbolic(f, args, stype, metadata)
578579
if f isa Symbol
579580
error("$f must not be a Symbol")

0 commit comments

Comments
 (0)