From 6aa6b2b1e8fbb2ac35531bb8ed5b468775de3a78 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Thu, 23 May 2019 12:37:17 -0700 Subject: [PATCH] Add a test for PR 32097 This example reproduces the issue observed in issue 32092 on Julia 1.1 that was fixed by PR 32097. --- stdlib/LinearAlgebra/test/matmul.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stdlib/LinearAlgebra/test/matmul.jl b/stdlib/LinearAlgebra/test/matmul.jl index bf929c3ba3b12..bc3d3d8607afa 100644 --- a/stdlib/LinearAlgebra/test/matmul.jl +++ b/stdlib/LinearAlgebra/test/matmul.jl @@ -508,4 +508,13 @@ end @test success(pipeline(cmd; stdout=stdout, stderr=stderr)) end +struct A32092 + x::Float64 +end +Base.:+(x::Float64, a::A32092) = x + a.x +Base.:*(x::Float64, a::A32092) = x * a.x +@testset "Issue #32092" begin + @test ones(2, 2) * [A32092(1.0), A32092(2.0)] == fill(3.0, (2,)) +end + end # module TestMatmul