diff --git a/Project.toml b/Project.toml index 554929177..92516b8b4 100644 --- a/Project.toml +++ b/Project.toml @@ -26,6 +26,7 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" Requires = "ae029012-a4dd-5104-9daa-d747884805df" RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" @@ -63,6 +64,7 @@ MacroTools = "0.5" NaNMath = "0.3, 1" PrecompileTools = "1" RecipesBase = "1.1" +RecursiveArrayTools = "2" Reexport = "0.2, 1" ReferenceTests = "0.9" Requires = "1.1" diff --git a/src/num.jl b/src/num.jl index 5859ed606..6646e8e6e 100644 --- a/src/num.jl +++ b/src/num.jl @@ -197,3 +197,6 @@ function Base.Docs.getdoc(x::Num) end Markdown.parse(join(strings, "\n\n ")) end + +using RecursiveArrayTools +RecursiveArrayTools.issymbollike(::Union{BasicSymbolic,Num}) = true diff --git a/test/overloads.jl b/test/overloads.jl index 7218467e6..474218554 100644 --- a/test/overloads.jl +++ b/test/overloads.jl @@ -167,7 +167,7 @@ z2 = c + d * im @test sign(Num(1)) isa Num @test isequal(sign(Num(1)), Num(1)) @test isequal(sign(Num(-1)), Num(-1)) - + @test isequal(ℯ^a, exp(a)) using IfElse: ifelse @@ -237,3 +237,6 @@ for f in [<, <=, >, >=, isless] end @test_nowarn binomial(t, 1) + +using RecursiveArrayTools +@test RecursiveArrayTools.issymbollike(t)