Skip to content

Commit

Permalink
Add a test for PR 32097 (#32124)
Browse files Browse the repository at this point in the history
This example reproduces the issue observed in issue 32092 on Julia 1.1
that was fixed by PR 32097.

(cherry picked from commit 6da7aa8)
  • Loading branch information
ararslan authored and KristofferC committed Feb 20, 2020
1 parent f47a494 commit 36dbfbb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stdlib/LinearAlgebra/test/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -487,4 +487,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

0 comments on commit 36dbfbb

Please sign in to comment.