diff --git a/src/oneelement.jl b/src/oneelement.jl index 099dfa32..b5804fc6 100644 --- a/src/oneelement.jl +++ b/src/oneelement.jl @@ -82,6 +82,7 @@ function *(A::AbstractFillMatrix, x::OneElementVector) val = getindex_value(A) * getindex_value(x) Fill(val, (axes(A,1),)) end +*(A::AbstractZerosMatrix, x::OneElementVector) = mult_zeros(A, x) function *(A::OneElementMatrix, B::AbstractFillVector) check_matmul_sizes(A, B) diff --git a/test/runtests.jl b/test/runtests.jl index aee883da..27970d9d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2020,6 +2020,8 @@ end @test F * x isa Fill @test F * x == Array(F) * Array(x) end + + @test Zeros{Int8}(2,2) * OneElement{Int16}(2,2) === Zeros{Int16}(2) end @testset "OneElementMatrix * AbstractFillVector" begin @testset for ind in testinds(A)