diff --git a/src/Space.jl b/src/Space.jl index a5c9a9f2..843044a3 100644 --- a/src/Space.jl +++ b/src/Space.jl @@ -114,6 +114,8 @@ canonicaldomain(S::Space) = canonicaldomain(domain(S)) # This is used in place of == to support AnyDomain spacescompatible(f::D,g::D) where D<:Space = error("Override spacescompatible for "*string(D)) spacescompatible(::UnsetSpace,::UnsetSpace) = true +spacescompatible(::Space, ::UnsetSpace) = true +spacescompatible(::UnsetSpace, ::Space) = true spacescompatible(::NoSpace,::NoSpace) = true spacescompatible(f,g) = false ==(A::Space,B::Space) = spacescompatible(A,B) && domain(A) == domain(B) diff --git a/test/SpacesTest.jl b/test/SpacesTest.jl index 09c455f8..0e39593d 100644 --- a/test/SpacesTest.jl +++ b/test/SpacesTest.jl @@ -173,5 +173,10 @@ using ApproxFunOrthogonalPolynomials v = rand(4) v2 = transform(NormalizedChebyshev(), v) @test itransform(NormalizedChebyshev(), v2) ≈ v + + @testset "ApproxFun.jl issue 616" begin + x, D = Fun(), Derivative(Chebyshev()) + @test (D*Multiplication(x)*D)*x ≈ 1 + end end end