diff --git a/Project.toml b/Project.toml index a41f01e53..5e95d407d 100644 --- a/Project.toml +++ b/Project.toml @@ -83,7 +83,7 @@ SpecialFunctions = "2" StaticArrays = "1.1" SymbolicIndexingInterface = "0.3.14" SymbolicLimits = "0.2.0" -SymbolicUtils = "1.4" +SymbolicUtils = "1.7" julia = "1.10" [extras] diff --git a/src/complex.jl b/src/complex.jl index d1e7b4769..cd6c44607 100644 --- a/src/complex.jl +++ b/src/complex.jl @@ -21,7 +21,7 @@ symtype(a::ComplexTerm{T}) where T = Complex{T} istree(a::ComplexTerm) = true operation(a::ComplexTerm{T}) where T = Complex{T} arguments(a::ComplexTerm) = [a.re, a.im] -metadata(a::ComplexTerm) = a.re.metadata +metadata(a::ComplexTerm) = metadata(a.re) function similarterm(t::ComplexTerm, f, args, symtype; metadata=nothing) if f <: Complex diff --git a/test/complex.jl b/test/complex.jl index 47a10b9c6..1b4b7646f 100644 --- a/test/complex.jl +++ b/test/complex.jl @@ -34,4 +34,6 @@ end @test_nowarn substitute(z1, z=>1.0im) @test metadata(z1) == unwrap(z1.im).metadata @test metadata(z1) == unwrap(z1.re).metadata + z2 = 1.0 + z*im + @test isnothing(metadata(unwrap(z1.re))) end