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 f0ff01ee..56fe53be 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2023,6 +2023,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)