diff --git a/src/implementations/LinearAlgebra.jl b/src/implementations/LinearAlgebra.jl index 1273931..d577e6c 100644 --- a/src/implementations/LinearAlgebra.jl +++ b/src/implementations/LinearAlgebra.jl @@ -216,6 +216,13 @@ function promote_array_mul( return Matrix{promote_sum_mul(S, T)} end +function promote_array_mul( + ::Type{<:AbstractVector{S}}, + ::Type{<:LinearAlgebra.Transpose{T,<:AbstractVector{T}}}, +) where {S,T} + return Matrix{promote_sum_mul(S, T)} +end + function promote_array_mul( ::Type{<:AbstractMatrix{S}}, ::Type{<:AbstractVector{T}}, diff --git a/test/matmul.jl b/test/matmul.jl index 2c26a51..3f542d0 100644 --- a/test/matmul.jl +++ b/test/matmul.jl @@ -401,3 +401,10 @@ end @test MA.operate(*, x22, y) == x22 * y @test MA.operate(*, y, x22) == y * x22 end + +@testset "Vector*Transpose{Vector}_issue_256" begin + x = BigInt[1 2; 3 4] + A = [1 2; 3 4] + y = MA.@rewrite sum(A[i, :] * LinearAlgebra.transpose(x[i, :]) for i in 1:2) + @test y == BigInt[10 14; 14 20] +end