Skip to content

Commit 764a755

Browse files
fredrikekreKristofferC
authored and
KristofferC
committed
Remove zero arg methods of + and * from linalg tests (#56184)
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. (cherry picked from commit f5937b432c51f6b8a5b28eaa5c1583f1350e12a3) (cherry picked from commit cf965f3a6f52ed84c71e4f95010bbbe422741d8e)
1 parent c5e5d4e commit 764a755

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/matmul.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,8 @@ end
11161116
Base.zero(::Thing) = Thing(0.)
11171117
Base.one(::Type{Thing}) = Thing(1.)
11181118
Base.one(::Thing) = Thing(1.)
1119-
Base.:+(t::Thing...) = +(getfield.(t, :data)...)
1120-
Base.:*(t::Thing...) = *(getfield.(t, :data)...)
1119+
Base.:+(t1::Thing, t::Thing...) = +(getfield.((t1, t...), :data)...)
1120+
Base.:*(t1::Thing, t::Thing...) = *(getfield.((t1, t...), :data)...)
11211121

11221122
M = Float64[1 2; 3 4]
11231123
A = Thing.(M)

0 commit comments

Comments
 (0)