Skip to content

Commit dbbf35c

Browse files
ararslanKristofferC
authored andcommitted
Add a test for PR 32097 (#32124)
This example reproduces the issue observed in issue 32092 on Julia 1.1 that was fixed by PR 32097. (cherry picked from commit 6da7aa8)
1 parent 0a06275 commit dbbf35c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stdlib/LinearAlgebra/test/matmul.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,4 +487,13 @@ end
487487
@test success(pipeline(cmd; stdout=stdout, stderr=stderr))
488488
end
489489

490+
struct A32092
491+
x::Float64
492+
end
493+
Base.:+(x::Float64, a::A32092) = x + a.x
494+
Base.:*(x::Float64, a::A32092) = x * a.x
495+
@testset "Issue #32092" begin
496+
@test ones(2, 2) * [A32092(1.0), A32092(2.0)] == fill(3.0, (2,))
497+
end
498+
490499
end # module TestMatmul

0 commit comments

Comments
 (0)