diff --git a/src/func.jl b/src/func.jl index c9e7008b..2702193d 100644 --- a/src/func.jl +++ b/src/func.jl @@ -619,7 +619,7 @@ isconvertible(L::FunctionOperator) = L.traits.isconvertible isconstant(L::FunctionOperator) = L.traits.isconstant has_adjoint(L::FunctionOperator) = !(L.op_adjoint isa Nothing) has_mul(::FunctionOperator{iip}) where {iip} = true -has_mul!(::FunctionOperator{iip}) where {iip} = iip +has_mul!(::FunctionOperator{iip}) where {iip} = true has_ldiv(L::FunctionOperator{iip}) where {iip} = !(L.op_inverse isa Nothing) has_ldiv!(L::FunctionOperator{iip}) where {iip} = iip & !(L.op_inverse isa Nothing) @@ -772,7 +772,7 @@ function LinearAlgebra.mul!(w::AbstractArray, L::FunctionOperator{true}, v::Abst vec_output ? vec(W) : W end -function LinearAlgebra.mul!(w::AbstractArray, L::FunctionOperator{false}, ::AbstractArray, +function LinearAlgebra.mul!(w::AbstractArray, L::FunctionOperator{false}, v::AbstractArray, args...) _sizecheck(L, v, w) V, W, vec_output = _unvec(L, v, w) diff --git a/test/func.jl b/test/func.jl index 807e078b..68172f39 100644 --- a/test/func.jl +++ b/test/func.jl @@ -133,7 +133,7 @@ end @test size(op1) == (NK, NK) @test has_adjoint(op1) @test has_mul(op1) - @test !has_mul!(op1) + @test has_mul!(op1) @test has_ldiv(op1) @test !has_ldiv!(op1) @@ -167,7 +167,7 @@ end # Test standard operator operations (from original test) w = rand(N, K) - @test _mul(A, v) ≈ op1 * v ≈ mul!(w, op2, v) + @test _mul(A, v) ≈ op1 * v ≈ mul!(w, op2, v) ≈ mul!(w, op1, v) w = rand(N, K) @test _mul(A, v) ≈ op1(v, u, p, t) ≈ op2(v, u, p, t) v = rand(N, K) @@ -248,7 +248,7 @@ end @test size(op1) == (N, N) @test has_adjoint(op1) @test has_mul(op1) - @test !has_mul!(op1) + @test has_mul!(op1) @test has_ldiv(op1) @test !has_ldiv!(op1) @@ -405,4 +405,4 @@ end @test res ≈ a1 * A * v1 + b1 * w1 @test res + res2 ≈ (a1 * A * v1 + b1 * w1) + (a2 * A * v2 + b2 * w2) end -end \ No newline at end of file +end