diff --git a/src/contractor.jl b/src/contractor.jl index dbca4d0..3ee5150 100644 --- a/src/contractor.jl +++ b/src/contractor.jl @@ -39,10 +39,7 @@ function Base.show(io::IO, C::Contractor{N,Nout,F1,F2,ex}) where {N,Nout,F1,F2,e print(io, " - expression: $(C.expression)") end -function (C::Contractor{N,Nout,F1,F2,ex})(X::IntervalBox{N,T}) where {N,Nout,F1,F2,ex,T} - return C.forward(X)[1] -end - + (C::Contractor)(X) = C.forward(X)[1] function (C::Contractor{N,Nout,F1,F2,ex})( A::IntervalBox{Nout,T}, X::IntervalBox{N,T}) where {N,Nout,F1,F2,ex,T} diff --git a/test/runtests.jl b/test/runtests.jl index 21e5047..4785af5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -20,6 +20,8 @@ end X =IntervalBox(-1..1,2) @test C(X) == 0..2 + @test C((1,2)) == 5 + end @testset "Contractor without using macro" begin