Skip to content

Commit

Permalink
Remove zero arg methods of + and * from linalg tests (#56184)
Browse files Browse the repository at this point in the history
There are tests elsewhere that i) make sure there is no zero-arg methods
of these functions and ii) tests that e.g. `+()` throws a `MethodError`.
Without this patch there are test errors whenever the same test process
runs both of these tests.
  • Loading branch information
fredrikekre authored Oct 16, 2024
1 parent 8a79822 commit f5937b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/LinearAlgebra/test/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1139,8 +1139,8 @@ end
Base.zero(::Thing) = Thing(0.)
Base.one(::Type{Thing}) = Thing(1.)
Base.one(::Thing) = Thing(1.)
Base.:+(t::Thing...) = +(getfield.(t, :data)...)
Base.:*(t::Thing...) = *(getfield.(t, :data)...)
Base.:+(t1::Thing, t::Thing...) = +(getfield.((t1, t...), :data)...)
Base.:*(t1::Thing, t::Thing...) = *(getfield.((t1, t...), :data)...)

M = Float64[1 2; 3 4]
A = Thing.(M)
Expand Down

0 comments on commit f5937b4

Please sign in to comment.