diff --git a/src/oneelement.jl b/src/oneelement.jl index b5804fc6..f9951321 100644 --- a/src/oneelement.jl +++ b/src/oneelement.jl @@ -84,6 +84,8 @@ function *(A::AbstractFillMatrix, x::OneElementVector) end *(A::AbstractZerosMatrix, x::OneElementVector) = mult_zeros(A, x) +*(A::OneElementMatrix, x::AbstractZerosVector) = mult_zeros(A, x) + function *(A::OneElementMatrix, B::AbstractFillVector) check_matmul_sizes(A, B) val = getindex_value(A) * getindex_value(B) diff --git a/test/runtests.jl b/test/runtests.jl index 56fe53be..ac38b325 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2033,6 +2033,10 @@ end @test O * v isa OneElement @test O * v == Array(O) * Array(v) end + + A = OneElement(2,(2,2),(5,4)) + B = Zeros(4) + @test A * B === Zeros(5) end end